View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Seach & Replace Macro

s= Worksheets("Sheet1").Range("A1").Value
Cells.Replace What:="Branchname", _
Replacement:=s, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False

--
Regards,
Tom Ogilvy

"NQ Muzza" wrote:

I am preparing a template spreadsheet for a number of business units and
want to have a macro that will take a text label from a cell and run a macro
to replace a placeholder "BRANCHNAME" with the actual branch's name
throughout a multi-sheet document. i.e. Sometimes the "branchname" is only a
part of the text in the cell.

Help would be appreciated.
Thanks,
Murray