View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Alhat Bob Alhat is offline
external usenet poster
 
Posts: 30
Default Extract text from comments

Good point Gary's Student:
My code needs the insertion of 'On Error Resume Next' just inside the
For Loop
Your code will be quicker, but is limited by the SpecialCells limit
(about 8900 cells, as I recall)

(My compliments to Gary)

Regards
Bob



"Gary''s Student" wrote in message
...
Sub movem()
Set r = Cells.SpecialCells(xlCellTypeComments)
Set r = Intersect(r, Range("B:B"))
For Each rr In r
rr.Offset(0, 1).Value = rr.Comment.Text
Next
End Sub
--
Gary''s Student - gsnu2007L


"camlad" wrote:

First

I need to extract the text from comments in approximately 500 cells in
column B and place the text into the cells in column C. I am not talking
about simply moving the comment - he text needs to go from comment to
adjoining cell.



A bonus would be to delete the comment.



Please can you help me with a macro to do this automatically?



Second

Conversely I need a macro to do the reverse - that is to take the text
from
a cell and put it into a new comment in the adjoining cell - let us say
from
column B to column C



Thank you



Camlad