Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


How to auto add date and time to comment in Excel?

When you insert a comment into a cell, a user name will be inserted automatically by default. Have you ever wondered if the current date and time can be auto added to the comment as well? This will help you to quickly identify the time you created the comments. This article, I will introduce some tricks for you to deal with this problem in Excel.

Manually add date and time to comment with short cut keys

Auto add date and time to comment with VBA code

Excel Productivity Tools

Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial

Kutools for Excel: Save 70% of your time and solve 80% Excel problems for you. 300+ advanced features designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial

arrow blue right bubble Manually add date and time to comment with short cut keys

Without typing the data and time into the comment box, you can use these short cut keys to insert the data and time quickly and easily. Please do as follows:

1. Click one cell that you want to insert a comment with the current data and time, and then right click to choose Insert Comment form the context menu, see screenshot:


2. After inserting the comment, in the comment box, press Ctrl +; to insert the current date, and type a space bar, then press Ctrl + Shift +; to insert the current time, and the current data and time has been added into the comment at once, see screenshot:


3. And then you can edit your comment as your need.

arrow blue right bubble Auto add date and time to comment with VBA code

If you are not familiar with the short cut keys, don’t worry, here, I can talk about a VBA code to help you insert the date and time automatically.

1. Select the cell which you want to insert the comment.

2. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

3. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Auto add date and time to comment

Sub DatedComment()
'Update 20141110
Dim pComment As Comment
Dim WorkRng As Range
Set WorkRng = Application.ActiveCell
Set pComment = WorkRng.AddComment(Application.UserName & ":" & vbLf & Now & vbLf)
pComment.Shape.TextFrame.Characters(1, VBA.Len(Application.UserName) + 1).Font.Bold = True
End Sub

4. Then press F5 key to run this code, and a comment will be inserted to the selected cell with the date and time automatically, and you can edit the comment as your need, see screenshot:


Tip: This VBA cannot work if the selected cell has already been inserted comment before.

Related articles:

How to reset all comment positions in Excel?

How to highlight all cells with comments in Excel?

Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 80% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    BobS · 3 months ago
    Love it. Now, I would like to go one step further. When the cell value is changed, I want a comment inserted into the cell with the date/time the cell value changed. if a cell comment already exists, it will be replaced with the new cell comment. This will eliminate a column on my spreadsheet that tracks when an adjacent cell value is updated. Can you help?
  • To post as a guest, your comment is unpublished.
    Muhammad Saleem · 1 years ago
    In this video i will show you the present tense with few examples.
    Quadratic Equation
  • To post as a guest, your comment is unpublished.
    Angle properties · 1 years ago
    In this video I will show you how the angles are formed with different property.
    angle calculator
  • To post as a guest, your comment is unpublished.
    Smithg705 · 2 years ago
    Hey, you used to write amazing, but the last couple of posts have been kinda boring I miss your tremendous writings. Past couple of posts are just a little out of track! come on! bakdfdebffacdefe
  • To post as a guest, your comment is unpublished.
    Manu Allaert · 2 years ago
    If you work with a Belgian keyboard then Ctrl + does not work.
    To add the date in your command use Ctrl ; (semi-colon)