Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Replace
Bob,
If you want to replace text in the comment text, you can't use Find and Replace. You have to look in the Text property of the Comment object and replace the text directly. For example, Dim Rng As Range For Each Rng In ActiveSheet.UsedRange.SpecialCells(xlCellTypeComme nts) Rng.Comment.Text Replace(Rng.Comment.Text(), "replace text", "New Text") Next Rng -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com wrote in message ... Is there a way to use this code and have it apply to Comments only? I am trying to use the MatchCase and LookAt options. tia rngMyCell.Cells(xlCellTypeComments).Replace _ What:=strEdit_Find, Replacement:=strEdit_Replace, _ LookAt:=xlWhole, _ SearchOrder:=xlByRows, MatchCase:=True |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find & Replace: find part cell, replace whole cell | Excel Worksheet Functions | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
Find and replace results can the appearance of find be different? | Excel Discussion (Misc queries) | |||
where to put results of find operation in find and replace functio | Excel Worksheet Functions | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions |