Current cell value into comment

edizzi

New Member
Joined
Oct 22, 2009
Messages
2
I am wanting to know if it is possible to automatically put the current cell value into an existing comment on that cell. I have an auto populating excel sheet in my workbook that has comments on all the active cells. The existing comment looks as follows:

####
Text
Text
####

Each comment is four lines with the first being a number the middle two are text and the last being another number. The last line is the current cell value that I have put in by hand. I am wondering if it is possible for that last number to auto populate with the cell value?

Thanks,
edizzi
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Here's a macro that should do the trick:

Code:
Sub MacroCommenter()
Dim s As String
Dim r As Range

For Each r In ActiveSheet.UsedRange
On Error Resume Next
    s = r.Comment.Text
    r.Comment.Text Text:=s & Chr(10) & r.Value
Next r
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,989
Messages
6,122,622
Members
449,093
Latest member
catterz66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top