Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 837
Default tilda in VLOOKUP and MATCH

What exactly do VLOOKUP and MATCH do with tildas (~) in text strings?

=VLOOKUP("Hello~ World",array,2,0)
will match "Hello World" but not "Hello~ World"

=MATCH("Hello~ World",array,0)
will not match either string.

I am using Excel 2003, and Help does not say anything about this for either
function.

Jerry
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default tilda in VLOOKUP and MATCH

If you want to find Hello~ World, do:

VLOOKUP("Hello~~ World",array,2,0)

Tilde is a wildcard search. double tilde negates the wildcard concept.

"Jerry W. Lewis" wrote:

What exactly do VLOOKUP and MATCH do with tildas (~) in text strings?

=VLOOKUP("Hello~ World",array,2,0)
will match "Hello World" but not "Hello~ World"

=MATCH("Hello~ World",array,0)
will not match either string.

I am using Excel 2003, and Help does not say anything about this for either
function.

Jerry

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default tilda in VLOOKUP and MATCH

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)

Jerry W. Lewis wrote:

What exactly do VLOOKUP and MATCH do with tildas (~) in text strings?

=VLOOKUP("Hello~ World",array,2,0)
will match "Hello World" but not "Hello~ World"

=MATCH("Hello~ World",array,0)
will not match either string.

I am using Excel 2003, and Help does not say anything about this for either
function.

Jerry


--

Dave Peterson
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
second or third match in vlookup() or Match() Dan Excel Worksheet Functions 5 June 3rd 08 07:17 PM
How do you put a tilda above a letter ? [email protected] Excel Worksheet Functions 2 August 17th 07 10:36 PM
Vlookup when no value match caroline Excel Worksheet Functions 2 August 14th 07 01:19 PM
index Match, or Vlookup Match.. news.transedge.com Excel Worksheet Functions 1 August 3rd 07 02:00 AM
Match with tilda characater IanW Excel Worksheet Functions 6 September 26th 06 02:26 AM


All times are GMT +1. The time now is 08:47 AM.

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"