Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Seach & Replace Macro

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel seach Excel-lent Novice Excel Worksheet Functions 1 June 27th 08 11:12 PM
Using Find and Replace to replace " in a macro snail30152 Excel Programming 1 April 13th 06 11:58 PM
Dynamic Seach Values gti_jobert[_12_] Excel Programming 3 February 8th 06 04:27 PM
seach and replace '(' with an '/' Splt Window Diner Excel Discussion (Misc queries) 4 August 20th 05 03:19 PM
File name seach within open filetype Andrew[_27_] Excel Programming 0 January 21st 04 06:20 PM


All times are GMT +1. The time now is 12:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"