View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default VBA, find and replace

If you want a great tool for finding and replacing in an entire workbook or
workbooks and not just a single worksheet at a time, check out "flexfind".
This is an add-in. It really works wonders.

http://www.jkp-ads.com/FlexfindScreenshot.htm



--

"Aaron" wrote in message
...
I am having a hard time trying to write a macro that does a find and
replace
function on the workbook and then does another one on just a spreadsheet.
I've been googling vba code and haven't found a result. When I record the
macro myself, the code continues to return the same despite the function
running on a within a workbook and then just within a spreadsheet...

On the workbook...
Cells.Replace What:="Projections!n3", Replacement:="Projections!$n$3",
_
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:= _
False, ReplaceFormat:=False

On the worksheet...
Sheets("Projections").Select
Cells.Replace What:="n2=", Replacement:="$n$2=", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

Any ideas?