Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, I have a worksheet change event for when a value is entered into cell B2 as follows - If Range("B2") < "" Then Range("A2").Value = Now() This successfully inputs the "NOW" value (I want the value so it does not update - so an IF worksheet function cannot be used) into A2. I would like for this to work anywhere on the column range...so if B3 has a value, A3 displays now...and so on. I have tried to change the range in my VBA - and have used Range(B, B) Range("B:B") Range(B2, B3000) Range("B2:B3000") But nothing seems to work correctly. The closest I have got was to get the whole A column to populate with the value of now. Any ideas on what I am doing wrong? Thanks :) Rob -- systemx ------------------------------------------------------------------------ systemx's Profile: http://www.excelforum.com/member.php...o&userid=29254 View this thread: http://www.excelforum.com/showthread...hreadid=505652 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
If Not Intersect(Target,Columns("B:B")) Is Nothing Then IF Target.Value <"" Then Target.Offset(0,-1).Value = Now End If End If -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "systemx" wrote in message ... Hi all, I have a worksheet change event for when a value is entered into cell B2 as follows - If Range("B2") < "" Then Range("A2").Value = Now() This successfully inputs the "NOW" value (I want the value so it does not update - so an IF worksheet function cannot be used) into A2. I would like for this to work anywhere on the column range...so if B3 has a value, A3 displays now...and so on. I have tried to change the range in my VBA - and have used Range(B, B) Range("B:B") Range(B2, B3000) Range("B2:B3000") But nothing seems to work correctly. The closest I have got was to get the whole A column to populate with the value of now. Any ideas on what I am doing wrong? Thanks :) Rob -- systemx ------------------------------------------------------------------------ systemx's Profile: http://www.excelforum.com/member.php...o&userid=29254 View this thread: http://www.excelforum.com/showthread...hreadid=505652 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell value change to trigger macro (worksheet change event?) | Excel Programming | |||
Worksheet Change event | Excel Discussion (Misc queries) | |||
worksheet change event? | Excel Programming | |||
Change Cell from Validated List Not Firing Worksheet Change Event | Excel Programming |