I'm trying to find a way to fill a column (let's say A) with the current date, or TODAY() function, when a user adds or changes the same row.

For instance, A1 will get filled with 2/7/11 if I add something to B1 or edit C1. Notice that they are all on the same row.

Is this possible in excel? If so, how can I achieve this?

link|improve this question

73% accept rate
feedback

1 Answer

This is the code you're looking for: (right-click the tab / View Code).

The code puts the now() value in cell Rxxx

Private Sub Worksheet_Change(ByVal Target As Range)
   Dim Lijn
   Dim Cel

   Lijn = Target.Row
   Cel = "R" & Trim(Str(Lijn))
   Range(Cel).Value = Now()

End Sub
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.