Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 45
Default Find & Replace Help

My VBA Code is trying to Find the string 'STABLE' and Replace it with
the string 'STA', searching a VBA-selected variable range.

Code snippet follows:

Range("E5:X" & (iTotalRecs * 2 + 4)).Select

Selection.Replace What:="STABLE", Replacement:="STA", LookAt:=xlWhole,
_
SearchOrder:=xlByColumns, MatchCase:=True

When I step thru the Code, (current value of iTotalRecs is 1), I can
see the specified range of E5:X6 is selected. However, only the
'STABLE' values in Row 5 are replaced. Please help.

JingleRock

P.S.: I had failed experiments w/ xlPart and w/ xlByRows.
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
Find & Replace: find part cell, replace whole cell katy Excel Worksheet Functions 3 April 3rd 23 01:20 PM
Find and Replace - Replace with Blank Space Studebaker Excel Discussion (Misc queries) 4 April 3rd 23 10:55 AM
where to put results of find operation in find and replace functio DEP Excel Worksheet Functions 5 November 15th 06 07:52 PM
find and replace - replace data in rows to separated by commas msdker Excel Worksheet Functions 1 April 15th 06 01:00 AM
find replace cursor default to find box luffa Excel Discussion (Misc queries) 0 February 3rd 05 12:11 AM


All times are GMT +1. The time now is 11:19 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"