Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to update time in corresponding cell only
Hi,
I need HELP in figuring out how to update the time in correspoding cell when the value in the current cell gets changed. For example, if i have 10 rows where in if i change value in C1 then the time in cell D1 should get updated to the current time only. But if i change the value in cell C2, corresponding time in D2 shuld get changed only and not the time in cell C1 Currently i have written a macro such that Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("C5")) Is Nothing Then Exit Sub Else Range("C5").Next = Now() End If End Sub But this isnt giving me the flexibility for any row. Thanks in advance, Rusty |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to update time in corresponding cell only
How about
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 3 Then Target.Offset(0, 1).Value = Now() End If End Sub Hope this helps Rowan "Rusty" wrote: Hi, I need HELP in figuring out how to update the time in correspoding cell when the value in the current cell gets changed. For example, if i have 10 rows where in if i change value in C1 then the time in cell D1 should get updated to the current time only. But if i change the value in cell C2, corresponding time in D2 shuld get changed only and not the time in cell C1 Currently i have written a macro such that Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("C5")) Is Nothing Then Exit Sub Else Range("C5").Next = Now() End If End Sub But this isnt giving me the flexibility for any row. Thanks in advance, Rusty |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell Update only at a specific time. | Excel Discussion (Misc queries) | |||
Update a cell with a time. | Excel Discussion (Misc queries) | |||
Setting time of last update in a cell | Excel Discussion (Misc queries) | |||
How do you continuously update time and date in an Excel cell? | Excel Worksheet Functions | |||
How do you continuously update time and date in an Excel cell? | Excel Programming |