how to update time in corresponding cell only

G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top