LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default problem getting formulas in cells that user adresses..

Hi experts,

I got the following code from Tom Ogilvy (very good because it works as a
charm)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then
If Target.Column = 4 Then
sForm = "=if(OR(P4=""offerte"",P4=""afgesloten""),if(T4<" """,T4*V4,0),0)"
Cells(Target.Row, "W").Formula = Replace(sForm, 4, Target.Row)
end sub

This works if the user changes a cell in column 4 but it does not work if the
user copies a range of cells in lets say B10..B20

Is there a way to adapt the code above so that no matter what the user does,
if something is put in column 4 the formula has to be put in column W. ?

Thanks,
Pierre

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200512/1
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with copied formulas into cells AdamMiles47 New Users to Excel 1 October 5th 10 04:48 AM
Test bulk emails adresses? Sons Excel Discussion (Misc queries) 1 September 28th 09 03:28 PM
Adresses in Excel to Outlook Siolarzard Excel Discussion (Misc queries) 2 August 7th 06 10:05 AM
sending emails from adresses in cells? BerkBrian Excel Discussion (Misc queries) 1 June 20th 05 08:37 PM
problem sharing an excel workbook when my formulas reference user. Waiward Engineer Excel Programming 1 March 1st 05 05:41 PM


All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"