Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.substitute
I'm able to read a text file into a variable. Now I want to do a search and replace of ALL instances of the word "bitch". Using Application.substitute() I'm able to replace the first occurrence of the target string, but I want to replace ALL occurrences with "#####".
How do you get Application.substitute() to search and replace multiple instances of a target string? Or is there a better method? -Robert |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.substitute
Hi Robert,
Am Sat, 28 Sep 2019 13:11:20 -0700 (PDT) schrieb RG III: I'm able to read a text file into a variable. Now I want to do a search and replace of ALL instances of the word "bitch". Using Application.substitute() I'm able to replace the first occurrence of the target string, but I want to replace ALL occurrences with "#####". How do you get Application.substitute() to search and replace multiple instances of a target string? Or is there a better method? try: myStr = Replace(myStr, "bitch", "####") Regards Claus B. -- Windows10 Office 2016 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE.... max. limit 8 :( | Excel Discussion (Misc queries) | |||
Substitute | Excel Discussion (Misc queries) | |||
Replace vs Application.Substitute | Excel Programming | |||
SUBSTITUTE | Excel Worksheet Functions | |||
using a substitute value | Excel Programming |