vlookup and ~

Jquest

New Member
Joined
Jan 8, 2004
Messages
6
Hi guys

I have data on a sheet that as "~" exp: (~notht~125)
and for some reason excel can't find them why :rolleyes:

Thank you
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
From Excel Help on VLOOKUP

Lookup_value is the value to be found in the first column of the array. Lookup_value can be a value, a reference, or a text string.

Table_array is the table of information in which data is looked up. Use a reference to a range or a range name, such as Database or List.

If range_lookup is TRUE, the values in the first column of table_array must be placed in ascending order: ..., -2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwise VLOOKUP may not give the correct value. If range_lookup is FALSE, table_array does not need to be sorted.


You can put the values in ascending order by choosing the Sort command from the Data menu and selecting Ascending.


The values in the first column of table_array can be text, numbers, or logical values.


Uppercase and lowercase text are equivalent.


I would suggest Excel does not recognise ~ as text, number or a logical value

Richard
 
Upvote 0
Hi

There is data next to it that is linked, sorting is not an option.

vlookup will find everything except text that at "~" in it :(

thanks
 
Upvote 0
Jquest said:
Hi guys

I have data on a sheet that as "~" exp: (~notht~125)
and for some reason excel can't find them why :rolleyes:

Thank you
Hi Jquest:

I do not have an answer for you as to why? -- however, I am going to share some of my observations with the use of the special character ~ in regards to its with the VLOOKUP function ...
y040108h1.xls
ABCDEFGH
1
2a~Notht~125ka~Notht~125~Notht~125#N/A
3b~Notht125p~Notht125#N/A
4cNotht~1255Notht~125#N/A
5Notht125#N/A
6
7itisinteresting--theuseof~intheLOOKUPvalueisnotpermitted
8fromthetwoexampleshere--itappearsthatthe~mayappearinthevaluetobeLOOKEDUP
9butaslongasavaluewithoutthe~(tildecharacters)isavailableasLOOKUP, LOOKUPvalueswithandwitout~areconsideredtobeequivalent
10
11
12a~Notht~125ka~Notht~125~Notht~125s
13b~Notht125p~Notht125s
14cNotht~1255Notht~125s
15dNotht125sNotht125s
16
Sheet4


This special character better be used with some caution -- to ensure that one does not get unexpected results.
 
Upvote 0
Jquest said:
Hi guys

I have data on a sheet that as "~" exp: (~notht~125)
and for some reason excel can't find them why :rolleyes:

Thank you

~ has a special meaning which must be deactivated to have it as an odinary char...
Book2
BCDEFG
1LTableLookupvalueRetrievalresult
2~Notht~125fra~Notht~125fra
3~Notht125xsa~Notht125xsa
4Notht~125zxaNotht~125zxa
5Notht125draNotht125dra
6
Sheet1


The formula in G2 is:

=VLOOKUP(SUBSTITUTE(F2,"~","~~"),$B$2:$C$5,2,0)
 
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,826
Members
449,190
Latest member
rscraig11

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