Vlookup with | and ~ characters

msbetty

New Member
Joined
Mar 18, 2009
Messages
10
I am trying to do a Vlookup with a string that has the | (pipe) and ~ (tilde) characters in it.

Vlookup doesn't appear to recognize or be able to do a match on these character.

My string looks something like this - 112|a3457|lmpop|~|~

And yes, I do need all these elements.

I've formatted both the target and source to be consistent.

I've copied a cell from the target and put it in the source and the Vlookup didn't recognize it.

I've tried a find and replace on these characters and Find didn't find them.

I've an ugly feeling that I'm doomed.

Any ideas, anyone?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
What's the actual lookup value?

pipes should be OK but ~ is used when you want to look for a literal wildcard, e.g. to find an actaul asterisk you search for "~*"

Similarly to search for tilde you need two.

If lookup value is A2 then try replacing with

=SUBSTITUTE(A2,"~","~~")

for example in the VLOOKUP like

=VLOOKUP(SUBSTITUTE(A2,"~","~~"),F2:G10,2,0)
 
Upvote 0
Hi Barry,

The string in my original post is the match field from source tab to target tab.

I've not used the SUBSTITUTE Function before.

I'll give it a whirl.

b
 
Upvote 0
Hi Barry,

Success!!! (sort of)

I now have a #Value error on the items that should have brought back some data, but I think that is a different problem.

The Substitute command worked great!

Thank you very much!

b
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,108
Members
452,544
Latest member
aush

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