Excel Macro to Create Timestamp

preview_player
Показать описание
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

🍐Join my online course on Excel Tables

🍓Download my free eBook on Excel Macros

🍇Check these Books on Excel

🍉Read my articles on Excel

🍏Playlist for Shorts on Excel

Song : Inspire by CreativeMediass
Music provided by Tune Tank

#TimeStampinExcel #excelvba #excelmacro
Рекомендации по теме
Комментарии
Автор

The TimeStamp function in not static, each time when we close and reopen the workbook the time is automatically updated to the current opening time of the workbook. Please update formula to make it static, otherwise of no use.

rakeshrajpal
Автор

How to join all the same T1 Column values representing in T2 column. Result should display in T3

bharathg
Автор

Very informative,

Please make a series on VBA

rawwiser
Автор

I only need timestamp update in one location irrespective of uppdate in whole excel sheet. Is it possible?

TheSpidyfire
Автор

Hi sir...
Please create videos on macros in excel from beginner to advanced

altaf