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 have two columns A and B and many lines with some specific tasks to be done. In column B, I have a drop-down list with the name of people who are scheduled for the task . And in column A, I want the date of the day the person signed off the task.

What should I do in VBA or in Excel so that, for example, when somebody signs off a task in the cell B11, A11 returns me the date of the day.

I have used the formula below in A11 =if (B11<>"", today(),"") but everytime i open the file the date is updated. So it doesn't allow me to keep track of everybody's work.

I tried with vba but couldn't write a function that gives me the right answer. i'm pretty new at vba so i'm sorry if my question sounds stupid

share|improve this question
add comment

1 Answer

I spent 5min playing around with the below macro that I found here:

Private Sub Worksheet_Change(ByVal Target As Range)
  Range("S" & Target.Row) = Date
End Sub

It will put the current Date in Column S, anytime anything in the selected row is changed. It might be possible to adjust the macro to look for changes in a particular cell or column.

share|improve this answer
add comment

Your Answer

 
discard

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