Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting info from FIND/REPLACE
I run something like:
Sub Macro2() Dim ws As Worksheet For Each ws In Worksheets ws.Activate Cells.Replace What:="xxx", Replacement:="yyy" Next End Sub This runs over many, many sheets. Most sheets don't have the string. Is there any way I can return something from Replace to tell me if any replacements were actually made in a given sheet? I would like to break out of the loop once I get to the sheet that contained the string in question. -- Gary's Student |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions | |||
Using Find and Replace to replace " in a macro | Excel Programming | |||
Replace method - cannot find any data to replace | Excel Programming | |||
Code to search and replace info on modules | Excel Programming |