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

Can someone tell me what's wrong with my code? I am trying to search/replace
several text strings with one macro. Is this possible?

Columns("S:S", "BA:BA").Select
Selection.Replace What:="accuracy", Replacement:="accuracy1"
Selection.Replace What:="XS_EXOFF", Replacement:="XS_EXOFF1"
xlPart , SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False

Thanks-
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Search and Replace help

Try this...

Union(Range("S:S"), Range("BA:BA")).Select
Selection.Replace What:="accuracy", Replacement:="accuracy1"
Selection.Replace What:="XS_EXOFF", Replacement:="XS_EXOFF1"

HTH

"hodeware" wrote:

Can someone tell me what's wrong with my code? I am trying to search/replace
several text strings with one macro. Is this possible?

Columns("S:S", "BA:BA").Select
Selection.Replace What:="accuracy", Replacement:="accuracy1"
Selection.Replace What:="XS_EXOFF", Replacement:="XS_EXOFF1"
xlPart , SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False

Thanks-

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
Search and Replace LymaBeane Excel Worksheet Functions 2 September 13th 06 10:30 PM
Search and Replace Rebecca Excel Discussion (Misc queries) 1 May 14th 05 11:53 AM
Search and Replace Rebecca New Users to Excel 3 February 27th 05 09:29 PM
Search and Replace... Paul B[_7_] Excel Programming 0 October 1st 03 06:12 PM
Search and Replace... Paul B[_7_] Excel Programming 0 October 1st 03 06:12 PM


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