how to timestamp in excel
Timestamps are super handy when you want to keep track of when data was entered or modified in Excel. To timestamp in Excel, you can use a simple formula or a bit of VBA code. Once set up, your spreadsheet will automatically record the date and time whenever you update a cell.
Step-by-Step Tutorial on How to Timestamp in Excel
By following these steps, you’ll learn how to create an automatic timestamp in your Excel sheet. You can choose between using a formula or applying VBA code.
Step 1: Open Excel
Start by opening your Excel workbook.
It’s important to start with a clean slate or an existing sheet where you want to add timestamps.
Step 2: Select a Target Cell
Click on the cell where you want the timestamp to appear.
Make sure this cell is easy to spot so you can see when it updates.
Step 3: Use the Formula
Enter the formula =NOW() in the selected cell.
This formula will show the current date and time whenever the sheet is recalculated.
Step 4: Make the Timestamp Static
To make the timestamp static, copy the cell and paste it as a value.
Right-click the cell, choose "Copy," then right-click again and select "Paste Special > Values."
Step 5: Use VBA for Automatic Updates
Press Alt + F11 to open the VBA editor and insert a new module.
Paste the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
With Target
.Offset(0, 1).Value = Now
End With
End If
End Sub
This code will automatically insert a timestamp in the next column when you update cells A1 to A10.
What Happens Next?
After following these steps, your Excel sheet will display timestamps next to your data entries. Using the VBA method, the timestamps will update automatically whenever you change a cell in the specified range. If you used the formula, you might need to manually make the timestamp static as needed.
Tips for How to Timestamp in Excel
- Always save a backup before running VBA code to avoid losing important data.
- Use
Ctrl + ;to quickly insert the current date manually. - Utilize
Ctrl + Shift + ;to insert the current time. - Combine both shortcuts (
Ctrl + ;andCtrl + Shift + ;) to add both date and time in a cell. - Keep your VBA code organized and comment on what each part does for easier maintenance.
Frequently Asked Questions
How do I make a timestamp automatic without VBA?
You can use the =NOW() function but remember it updates every time the sheet recalculates.
Can I customize the timestamp format?
Yes, right-click the cell with the timestamp, select "Format Cells," and choose your desired date and time format.
Will VBA code work on Excel Online?
No, VBA is not supported in Excel Online. You’ll need to use Excel’s desktop application.
Is there a way to undo a timestamp?
If you used VBA, you can delete the timestamp manually. If you used a formula, simply remove the formula.
Can timestamps work on multiple sheets?
Yes, but you’ll need to apply the VBA code to each worksheet where you want timestamps.
Summary
- Open Excel.
- Select a target cell.
- Use the
=NOW()formula. - Make the timestamp static.
- Use VBA for automatic updates.
Conclusion
Timestamps in Excel are invaluable for tracking data entry and modifications. Whether you’re a beginner or an Excel whiz, knowing how to timestamp in Excel can make your life easier. With just a few steps, you can use formulas for quick timestamps or dive into VBA for more automated solutions.
This guide has laid out everything from basic commands to advanced VBA scripting. If you’re hungry for more Excel tricks, why not explore additional features like conditional formatting or pivot tables?
Remember, practice makes perfect. So, open up Excel and give these tips a try!

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.
His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.