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.
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
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.
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.
Recommended Productivity Tools
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.· 3 months agoLove 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.· 1 years agoIn this video i will show you the present tense with few examples.
To post as a guest, your comment is unpublished.· 1 years agoIn this video I will show you how the angles are formed with different property.
To post as a guest, your comment is unpublished.· 2 years agoHey, 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.· 2 years agoIf you work with a Belgian keyboard then Ctrl + does not work.
To add the date in your command use Ctrl ; (semi-colon)