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: 19
Default Replace Function using Wildcards


Hello,

I am using the VBA replace function and wondering if I can include wildcard
to find a text.

For example my string is...

"a) Akli Amine Mohamed b) Killech Shamir c) Kali Sami Elias"

and i want to replace the letter and closing brackets with a semi colon so
it looks like this...

";Akli Amine Mohamed; Killech Shamir; Kali Sami Elias"

i tried the replace function but could only replace the closing brackets,
not the letter to the left.

Replace("a) Akli Amine Mohamed b) Killech Shamir c) Kali Sami Elias", ")",
";")

and output was...

a; Akli Amine Mohamed b; Killech Shamir c; Kali Sami Elias

my question is, can I use a wildcard in the replace function so the closing
bracket and letter to the left are replaced by the semi colon.

appreciate help and perhaps a better way to do this.

thanks,

bobm
 
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 and Replace wildcards Colin Hayes Excel Worksheet Functions 2 February 16th 10 11:16 PM
Replace with wildcards PDA Excel Discussion (Misc queries) 2 November 11th 09 01:20 PM
Replace using Wildcards Stella Excel Worksheet Functions 1 June 23rd 06 06:48 PM
wildcards in replace [email protected] Excel Programming 3 December 2nd 05 12:21 AM
Replace using wildcards jeb Excel Discussion (Misc queries) 6 January 6th 05 03:35 PM


All times are GMT +1. The time now is 07:09 PM.

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"