LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Using a cell reference within a macro to find and replace

I currently use the following within a macro:

Range("B7:B100").Select
Application.ReplaceFormat.Interior.ColorIndex = 3
Selection.Replace What:="sutherland", Replacement:="Sutherland",
LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=True

I am not sure if this is the best way to accomplish what I need....but it
works. It looks for sutherland, finds it, and basicly shades the cell with
colorindex=3. Question is....Can I somehow substitute a cell reference in the
What:="xxx" area. I would like the macro to search the range for a match to a
specific cell and then replace with that cells value and color code the cell.

Thanks,

Ken
 
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
Macro to Find and Replace R Storey Excel Discussion (Misc queries) 6 December 6th 06 07:04 PM
Macro to Find & Replace [email protected] Excel Worksheet Functions 2 September 14th 06 07:17 PM
Macro: Find and replace Bertie Excel Discussion (Misc queries) 1 May 29th 06 02:01 PM
find&replace macro Elainey Excel Worksheet Functions 0 January 6th 06 09:20 PM
find and replace cell reference to a new worksheet Johnny Van Excel Worksheet Functions 0 June 23rd 05 03:41 AM


All times are GMT +1. The time now is 02:10 AM.

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

About Us

"It's about Microsoft Excel"