Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .