ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to deal with "~" (https://www.excelbanter.com/excel-discussion-misc-queries/199808-how-deal-%7E.html)

kelly

how to deal with "~"
 
Hi, all

i have a problem to lookup or replace words when it contains "~"
character.
every time i have to change it to "-" manualy. for there are lots of
"~" in the workfile, too much time has been wasted on it.
Can anybody have any idea to solve this?

thanks

Rick Rothstein \(MVP - VB\)[_1165_]

how to deal with "~"
 
Use two of them. If you are looking for AB~CD, put AB~~CD in the "Find what"
field.

Rick


"kelly" wrote in message
...
Hi, all

i have a problem to lookup or replace words when it contains "~"
character.
every time i have to change it to "-" manualy. for there are lots of
"~" in the workfile, too much time has been wasted on it.
Can anybody have any idea to solve this?

thanks



Dave Peterson

how to deal with "~"
 
Just to add...

Excel can use wildcards:
* for any characters
? for any single character
~ as an "escape" character to indicate that the next * or ? should be treated as
an asterisk or question mark--not as wild cards.

So if you're using an =vlookup() for instance, you can avoid wildcard problems
with a formula like:

=VLOOKUP(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"~"," ~~"),"?","~?"),"*","~*"),
Sheet2!$A:$B,2,FALSE)



kelly wrote:

Hi, all

i have a problem to lookup or replace words when it contains "~"
character.
every time i have to change it to "-" manualy. for there are lots of
"~" in the workfile, too much time has been wasted on it.
Can anybody have any idea to solve this?

thanks


--

Dave Peterson


All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com