2 Different methods to create Timestamp in Excel are explained in this video.
1. User Defined Function to record Date and Time of Data Entry.
Function TimeStamp(XNC As Range)
If XNC.Value Not Equal to (use angle brackets) "" Then
TimeStamp = Format(Now, "dd-mm-yyyy hh:mm:ss")
Else
TimeStamp = ""
End If
End Function
2. Macro to insert Timestamp
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Port
If Target.Column = 1 And Target.Value Not Equal to (use angle brackets) "" Then
Application.EnableEvents = False
Target.Offset(0, 1) = Format(Now, "dd-mm-yyyy hh:mm:ss")
Application.EnableEvents = True
End If
Port:
End Sub
Top 25 Microsoft Word Tips and Tricks - https://youtu.be/l25Evu4ohKg
7 Most Important Tools in Excel - https://youtu.be/Pc88LGWNO70
Download my free eBook on Excel Macros - http://eepurl.com/gpT0RD
Check these Books on Excel - https://xlncad.com/excel-resources/
Read my articles on Excel - https://xlncad.com/
If you’ve found my videos helpful or enjoyable, consider supporting me with a coffee!
buymeacoffee.com/ajayanand
Subscribe to @XLnCADMalayalam for Excel, Word, PowerPoint, Access, Python and Power BI Tutorials in Malayalam.
https://www.youtube.com/c/XLnCADMalayalam
Disclaimer: If you click on my affiliates links, I am going to receive a tiny commission. The products that I advertise are the ones I believe in.
My Running Kit for Hyderabad Marathon 2025
https://amzn.to/44IILeG
Think Like an Analyst: Books That Helped Me
https://amzn.to/3SNy6bi
Mind-Opening Reads You Can’t Miss
https://amzn.to/43tM2fu
Song : Inspire by CreativeMediass
Music provided by Tune Tank
#TimeStampinExcel #excelvba #excelmacro