Question: Vlookup and tilda ("~")

Sparkwood

New Member
Joined
Apr 23, 2003
Messages
2
Hi - Just a quick question:

Does anybody know of a way to get the vlookup function to work when the lookup value contains the tilda symbol.

Many thanks,

S.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Book1
CDEFG
1
2~a1~a1
3b2b2
4c3c3
5
Sheet1


The formula in G2 is...

=VLOOKUP(IF(ISNUMBER(SEARCH("~~",F2)),SUBSTITUTE(F2,"~","~~"),F2),$C$2:$D$4,2,0)
 
Upvote 0
Aladin & Mark, I'm just wondering why a standard VLOOKUP treats a tilde differently. In the formula bar, ~a shows up as text, the same as b or c.
 
Upvote 0
I don't believe that it's documented. VLOOKUP behaves like MATCH if it's 4th argument is 0 or FALSE.

From the MATCH Help topic Remarks...
If match_type is 0 and lookup_value is text, lookup_value can contain the wildcard characters asterisk (*) and question mark (?). An asterisk matches any sequence of characters; a question mark matches any single character.
 
Upvote 0

Forum statistics

Threads
1,217,383
Messages
6,136,259
Members
450,001
Latest member
KWeekley08

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top