![]() |
Copy Comments to a cell
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 |
Copy Comments to a cell
Sub demo()
Dim r As Range, rr As Range Set r = ActiveSheet.UsedRange.SpecialCells(xlCellTypeComme nts) Set r = Intersect(r, Columns("O")) For Each rr In r rr.Offset(0, 8).Value = rr.Comment.Text Next End Sub -- Gary's Student "CLR" wrote: 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 |
Copy Comments to a cell
Hi Gary"s Student............
Your code works super-well..........thank you muchly, kind Sir. Vaya con Dios, Chuck, CABGx3 "Gary''s Student" wrote: Sub demo() Dim r As Range, rr As Range Set r = ActiveSheet.UsedRange.SpecialCells(xlCellTypeComme nts) Set r = Intersect(r, Columns("O")) For Each rr In r rr.Offset(0, 8).Value = rr.Comment.Text Next End Sub -- Gary's Student "CLR" wrote: 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 |
Copy Comments to a cell
You are very welcome.
-- Gary's Student "CLR" wrote: Hi Gary"s Student............ Your code works super-well..........thank you muchly, kind Sir. Vaya con Dios, Chuck, CABGx3 "Gary''s Student" wrote: Sub demo() Dim r As Range, rr As Range Set r = ActiveSheet.UsedRange.SpecialCells(xlCellTypeComme nts) Set r = Intersect(r, Columns("O")) For Each rr In r rr.Offset(0, 8).Value = rr.Comment.Text Next End Sub -- Gary's Student "CLR" wrote: 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 |
All times are GMT +1. The time now is 04:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com