View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How to set date cell when its row changes

You can use the Change Event

See Chip Pearson's page on Events

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 3 And Target.Rows.Count = 1 Then
Application.EnableEvents = False
Cells(3, "F").Value = Now()
Application.EnableEvents = True
End If
End Sub

Right click on the sheet tab and select view code. Put in code similar to
the above.

--
Regards,
Tom Ogilvy

"Jack Gur" <Jack wrote in message
...
I want to customize Excel such that when a user changes any column in a
particular row, a date column in that row will be updated to the current
date-time. Do I need a macro to do that? I have a software background, but
not in macros. Can someone jot for me please some code that would do that?
Thanks!!