
- MS Excel Basics
- Excel - Home
- Excel - Getting Started
- Excel - Explore Window
- Excel - Backstage
- Excel - Entering Values
- Excel - Move Around
- Excel - Save Workbook
- Excel - Create Worksheet
- Excel - Copy Worksheet
- Excel - Hiding Worksheet
- Excel - Delete Worksheet
- Excel - Close Workbook
- Excel - Open Workbook
- Excel - Context Help
- Editing Worksheet
- Excel - Insert Data
- Excel - Select Data
- Excel - Delete Data
- Excel - Move Data
- Excel - Rows & Columns
- Excel - Copy & Paste
- Excel - Find & Replace
- Excel - Spell Check
- Excel - Zoom In-Out
- Excel - Special Symbols
- Excel - Insert Comments
- Excel - Add Text Box
- Excel - Undo Changes
- Formatting Cells
- Excel - Setting Cell Type
- Excel - Setting Fonts
- Excel - Text Decoration
- Excel - Rotate Cells
- Excel - Setting Colors
- Excel - Text Alignments
- Excel - Merge & Wrap
- Excel - Borders and Shades
- Excel - Apply Formatting
- Formatting Worksheets
- Excel - Sheet Options
- Excel - Adjust Margins
- Excel - Page Orientation
- Excel - Header and Footer
- Excel - Insert Page Breaks
- Excel - Set Background
- Excel - Freeze Panes
- Excel - Conditional Format
- Working with Formula
- Excel - Creating Formulas
- Excel - Copying Formulas
- Excel - Formula Reference
- Excel - Using Functions
- Excel - Builtin Functions
- Advanced Operations
- Excel - Data Filtering
- Excel - Data Sorting
- Excel - Using Ranges
- Excel - Data Validation
- Excel - Using Styles
- Excel - Using Themes
- Excel - Using Templates
- Excel - Using Macros
- Excel - Adding Graphics
- Excel - Cross Referencing
- Excel - Printing Worksheets
- Excel - Email Workbooks
- Excel- Translate Worksheet
- Excel - Workbook Security
- Excel - Data Tables
- Excel - Pivot Tables
- Excel - Simple Charts
- Excel - Pivot Charts
- Excel - Keyboard Shortcuts
- MS Excel Resources
- Excel - Quick Guide
- Excel - Useful Resources
- Excel - Discussion
How to Auto Add Date and Time to Comment in Excel?
When we added the comments to the cells in Excel, you may have noticed that the comment will only contain the name of the user, but we can also customise the comment to add the date and time to the spreadsheet. We can use the process mentioned below to automatically add date and time to comments in Excel.
Read this tutorial to understand how you can automatically add date and time to comments in Excel by following a simple process.
Auto Add Date and Time to Comment in Excel
Here we will first insert a comment and then insert a VBA module to complete our task. Let's take a look at a simple procedure for adding date and time to comments in Excel. We will be using the help of the VBA application to complete our requirement, as it can’t be completed without the VBA code.
Step 1
Let's consider a new Excel sheet, then type your data and insert your comment by clicking right on "Comment" to insert the comment and entering your comment. Our comment will be displayed similarly to the comment shown in the below image.
To add a date and time, click on the cell, then right-click on the sheet name and select view code to open the VB application, then click on insert and select module, and finally type the programme into the text box as shown in the image below.
Program
Sub DatedComment() 'Update Nirmal 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
Step 2
Now save the file as a macro-enabled text file and click on "run" to successfully complete our process, and our comment will have a time stamp added to it as shown in the below image.
Conclusion
In this tutorial, we used a simple example to demonstrate how we can automatically add date and time to the comments in Excel to highlight particular sets of data.
- Related Articles
- How to Auto Add/Enter Current Date/Time in a Cell with Double Clicking in Excel?
- How to add comment to chart in Excel?
- How to add hyperlink to comment in Excel?
- How to Auto-Size a Comment Box to Fit Its Content in Excel?
- How to Add or Subtract Hours from a Date/Time Field in Excel?
- How to add comment to a data point in an Excel chart?
- How to Auto-Sort Date When Date is Entered or Changed in Excel?
- How to add a date and time in HTML5?
- How to Convert Number String to Date and Time in Excel?
- How to Auto-Fill Date or Only Weekdays Sequence in Excel?
- How to Add or Subtract Weeks to a Date in Excel?
- How to add new worksheet with current date in Excel?
- How to add days to date including or excluding weekends and holidays in Excel
- How to Add Date and Time Picker using only one tag in HTML?
- How Add or Subtract Specific Years, Months and Days to a Date in Excel?
