How do I command one column to update the date based off the update to another column?

Anonymous
2025-05-08T19:22:45+00:00

=C2=NOW() when B2="Inprogress" or "Sent For QC" or "Revision" or "Complete"

Example - I am trying to get column C to auto populate the date and time whenever column B is updated based off a drop down list in column B

I tried to share a screenshot - but it would not upload

Microsoft 365 and Office | Excel | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
HansV 462.7K Reputation points MVP Volunteer Moderator
2025-05-08T19:58:12+00:00

The function NOW() will be recalculated whenever Excel calculates anything, so it won't reflect the date/time that column B changed. You'll need VBA code, so it will work only in the desktop version of Excel for Windows and Mac, and users will have to allow macros.

Right-click the sheet tab.

Select View Code from the context menu.

Copy the code listed below into the worksheet module.

Switch back to Excel.

Save the workbook as a macro-enabled workbook (*.xlsm).

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim rng As Range
    Dim cel As Range
    Set rng = Intersect(Range("B2:B" & Rows.Count), Target)
    If Not rng Is Nothing Then
        Application.ScreenUpdating = False
        Application.EnableEvents = False
        For Each cel In rng
            Select Case cel.Value
                Case "Inprogress", "Sent For QC", "Revision", "Complete"
                    cel.Offset(0, 1).Value = Now
            End Select
        Next cel
        Application.EnableEvents = True
        Application.ScreenUpdating = True
    End If
End Sub

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2025-05-09T13:35:58+00:00

    Hi Hans - thank you so much! It is working just as I hoped!

    Was this answer helpful?

    0 comments No comments
  2. HansV 462.7K Reputation points MVP Volunteer Moderator
    2025-05-09T12:51:39+00:00

    I made a mistake in my previous reply. I have corrected it.

    You should not enter a formula in column C. The VBA code will enter the current date and time in column C when you select one of the specified values in a cell in column B.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2025-05-09T12:05:08+00:00

    Hi Hans,

    Thank you! I tried this but excel does not like my formula;

    =C2=NOW()=B2="Inprogress","Sent For QC","Revision","Complete"

    Was this answer helpful?

    0 comments No comments