LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default Can this be done?

Hi all,

The snippet of code below is what l am using to replace "deposit "
with "deposit-". Where the spaces in "deposit " can be anything from
1 space to 6 spaces. Can l use a wildcard character such as * to do
this? Any suggestions gratefully received. For information the range
the replace is to work on covers 1 column with a dynamic number of rows
usually no more than 1000.

With ActiveSheet
On Error Resume Next
.Replace What:="DEPOSIT ", Replacement:="DEPOSIT-",
lookat:=xlPart, searchorder _

:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
On Error GoTo 0
End With

Regards

Michael Beckinsale

 
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



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