Vlookup using wildcard

shophoney

Active Member
Joined
Jun 16, 2014
Messages
281
Hi, I have a credit card bill that i export.

I also have a lookup table.

taxi1234100#6070
taxi99880#6070
starbucks9#6620
tax123488#6070
taxi #555566#6070

<tbody>
</tbody>

I want the table above to do a vlookup in the table below. Look for anything *taxi* and use GL account #6070 . Lookup *starbucks* #6620 .

I will have a look of lookups.

taxi#6070
starbucks#6620
Home Depot#5060

<tbody>
</tbody>


Thanks
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Excel 2010
ABCDEFGH
1
2taxi1234100#6070
3taxi99880#6070taxi#6070
4starbucks9#6620starbucks#6620
5tax123488#6070Home Depot#5060
6taxi #555566#6070

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
C2=VLOOKUP(LEFT($A2,3)&"*",$G$3:$H$5,2,0)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Seems to Work...
 
Upvote 0
Hi, thanks for the reply.

Maybe my example wasn't clear.

Column "C" is the Vlookup formula.

In your formula what is the "3", after the "A2"?

When I paste your example. I get a "0". I would assume that's a false.

I'm trying to find any "TAXI" and having it use GL account #6070 .

Thanks
 
Upvote 0
My formula IS in Cell C2

It first looks into A2 and considers ONLY the 1st 3 characters whatever is there ("tax" in this specific case) then adds a "*" to it making the full Lookup Value to be "tax*".
Copy the same C2 formula down to all required cells...
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

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