2

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

1 Answer 1

3

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.

You must log in to answer this question.