Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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