Last Updated Date

Sometimes you want to automatically add the Last Updated Date when values in a certain column are changed. You may follow the steps below to setup the required macro;
Assumption: You have a 'Status' field in Column B and want to record 'Last Updated Date' in Column C,
1. Right-click on the sheet tab at the bottom and choose View Code
2. Paste the code below in the right pane in the VB Editor window which opens up
Private Sub Worksheet_Change(ByVal Target As Range)
Set Rng = Application.Intersect(Range("B:B"), Range(Target.Address))
If Rng Is Nothing Then
' Do nothing
Else
Target.Offset(0, 1) = Format(Date, "dd-mmm-yyyy")
End If
End Sub
3. Close the Editor window
4. Save the workbook as xlsm (Macro Enabled)
5. Test it by updating cells in Column B.
Attachment | Size |
---|---|
Add Last Updated Date.xlsm | 14.17 KB |
»
- SheelooC's blog
- Login or register to post comments
- 3159 reads
Recent comments
6 years 3 weeks ago
6 years 41 weeks ago
7 years 1 week ago
7 years 4 weeks ago
7 years 5 weeks ago
7 years 10 weeks ago
7 years 18 weeks ago
7 years 19 weeks ago
7 years 19 weeks ago
7 years 19 weeks ago