Copy Comments to a cell

G

Guest

Hi All.........
Can anyone please tell me how to interrogate all the cells in column O, and
if there's a CommentBox applied, to copy the Text from the CommentBox to a
cell in the same row but in column W? If no CommentBox, then just leave the
corresponding cell in column W empty.

TIA
Vaya con Dios,
Chuck, CABGx3
 
G

Guest

Sub demo()
Dim r As Range, rr As Range
Set r = ActiveSheet.UsedRange.SpecialCells(xlCellTypeComments)
Set r = Intersect(r, Columns("O"))
For Each rr In r
rr.Offset(0, 8).Value = rr.Comment.Text
Next
End Sub
 
G

Guest

Hi Gary"s Student............
Your code works super-well..........thank you muchly, kind Sir.

Vaya con Dios,
Chuck, CABGx3
 
G

Guest

You are very welcome.
--
Gary's Student


CLR said:
Hi Gary"s Student............
Your code works super-well..........thank you muchly, kind Sir.

Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top