Selecting used cells only in the workbook
"Edit|Find and Edit|Replace will only use the usedrange..."
SMACKS! forehead <g I knew that.
"Dave Peterson" wrote:
Edit|Find and Edit|Replace will only use the usedrange--so don't worry about
that.
But you could drop the selection
For Each wsSheet In Worksheets
wssheet.Cells.Replace What:="*!", Replacement:="=", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Next wsSheet
It kind of looks like you're changing strings to formulas.
You may want to turn calculation to manual, loop through the sheets, then turn
the calculation to automatic.
One giant calc may be faster (or not!) than a bunch of smaller calcs.
Sandeep wrote:
Hi
I am using this code for mass replacing...
For Each wsSheet In Worksheets
wsSheet = Application.ActiveSheet
Cells.Select
Selection.Replace What:="*!", Replacement:="=", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False
Next wsSheet
Is it possible that instead of "Cells.Select" i can use only used cells in
the worksheet or even in the complete workbook to increase the performance??
Thanks,
Sandeep
--
Dave Peterson
|