Vba add timestamp after macro execution in Excel
To do it in Excel, here is the answer:
- Option Explicit
- Sub AddTimeStamp()
- ActiveSheet.Range("A2") = "Last Updated On " & Format(Now, "dd-mmm-yyyy, hh:mm")
- End Sub
a) Line 3 gets the system time and updates cell A2 with the same in the specified format.
Result after Macro execution: