Vlookup with "*" in the data field

808stu

New Member
Joined
May 2, 2018
Messages
5
I am using VLOOKUP (exact match)with a table that has the following values:
AGE5
AGE*
AGE*ACRE

<tbody>
</tbody>

Because of the asterisk, when I use the VLOOKUP function, it displays results from AGE* as 5 rather than 0 or nothing. I am using the VLOOKUP exact match, but I think Excel is confused with the "*" in the lookup field because it acts as a wildcard. My formula is: " =VLOOKUP(C7,TABLE,2,FALSE). Any help would be much appreciated. Thank you!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I've had the same issue in the past.
try changing your VLOOKUP to a MATCH instead.
 
Last edited:
Upvote 0
Try putting a tilde (~) in front of the asterisk.
Excel Workbook
ABCDEFGHIJ
1AGE5AGE~*
2AGE*11
3AGE*ACRE01
4
Sheet
 
Upvote 0
Sorry, I forgot to mention, the data with the asterisk is downloaded and I don't want to change the data. I've found adding any letter after "age" will resolve the issue, but there are hundreds of rows to make this change and many users will use this so I want to avoid making everyone from having to make these edits. Thank you
 
Upvote 0
You can use SUBSTITUTE in your formula to do it:

=VLOOKUP(SUBSTITUTE(C7,"*","~*"),TABLE,2,FALSE)
 
Upvote 0

Forum statistics

Threads
1,214,824
Messages
6,121,784
Members
449,049
Latest member
greyangel23

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