Open In App

How to Automatically Insert Date and Timestamp in Excel?

The Date and Timestamp is a type of data type that determines the date and time of a particular region. It contains some characters along with some encoded data. This format may vary from language to language. Keeping track of date and time helps in managing records of our work as well as segregate the information day-wise. In this article, we will be going to learn how we can automatically insert Date and Timestamp in Excel.

There are multiple ways to insert Date and Timestamp in Excel. These methods include both static and dynamic methods.



1. Inserting Date And Timestamp using keyboard shortcuts (Static method)

The static method is helpful when there are only a few cells where you need to insert the Date and Timestamp. You can quickly use the keyboard shortcut to manually insert the Date and Timestamp.

Follow the below steps to implement the same:



2. Inserting Date And Timestamp using  Formulas:

The NOW() and TODAY() functions can be used to insert the current date and time that will update automatically. This method dynamically updates the date-time whenever a change is made in the worksheet.

  1. NOW(): To insert current date and time.
  2. TODAY(): To insert the current date.

Follow the below steps to implement the same:

3. Insert Timestamp Automatically While Entering Data In Different Column

This method will enable the insertion of the timestamp in a column while entering data into another column. For example, consider two columns A and B in your worksheet. While you enter data in a cell of column A, the current date and time in the corresponding cell in Column B will get updated automatically.

Follow the below steps to implement the same:

=IF(A1<>"",IF(B1<>"",B1,NOW()),"")

4. Using VBA To Insert Timestamp Automatically While Entering Data In a Different Column

If you are familiar with working on VBA, then there is another method for you to automatically insert the timestamp in your excel sheet using VBA.

Follow the below steps to implement the same:

Function MyTimestamp(Reference As Range)

If Reference.Value <> "" Then

MyTimestamp = Format(Now, "dd-mm-yyyy hh:mm:ss")

Else

MyTimestamp = ""

End If

End Function

A is the column for inserting entries of data.
B is corresponding column, into which the date and timestamp will be updated.

Type the below formula into B1 cell:
=MyTimestamp(A1)

Article Tags :