ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert Date Comment (https://www.excelbanter.com/excel-programming/302845-insert-date-comment.html)

Aaron

Insert Date Comment
 
Hi,

I am wanting to insert a comment with the current date when I change a cell value within a Range of cells. Thanks in advance!

Thanks,
Aaron

Bernie Deitrick

Insert Date Comment
 
Aaron,

You can use the worksheet's change event. Copy the code below, right click
on the sheet tab, select "View code", then paste in the window that appears.
Change the range from A1:C10 to match your desired range.

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:C10")) Is Nothing Then
Target.AddComment CStr(Date)
End If
End Sub


"Aaron" wrote in message
...
Hi,

I am wanting to insert a comment with the current date when I change a

cell value within a Range of cells. Thanks in advance!

Thanks,
Aaron





All times are GMT +1. The time now is 06:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com