Need Help With Wildcard Vlookup

needhelp221

New Member
Joined
Aug 19, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I have a list of items that I need to be able to use a vlookup to see if it contains a certain string of text.

For example I need to use the below items to be able to do a look up based off everything before "-4". I know I could do an =len and then use that to do an =left to get rid of the -4 but there is a lot of variability and I'd prefer to use a vlookup and some sort of wildcard.

HSP-39026-4
HSP-39025-4
HSP-39019-4
HSP-39016-4
HSP-39015-4
HSP-39009-4
HSP-39043-4
HSP-39042-4
HSP-38076-4
HSP-38075-4
HSP-38066-4
HSP-38065-4

Any help would be much appreciated.

Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Is this what you want??

Book1
BCDEFG
7HSP-39019HSP-39019-4HSP-39026-4
8HSP-39025-4
9HSP-39019-4
10HSP-39016-4
11HSP-39015-4
12HSP-39009-4
13HSP-39043-4
14HSP-39042-4
15HSP-38076-4
16HSP-38075-4
17HSP-38066-4
18HSP-38065-4
19
20
21
Sheet1
Cell Formulas
RangeFormula
C7C7=VLOOKUP(B7&"*",F:F,1,0)
 
Upvote 0
I want the reverse- I want the longer number with the dash to return the value that doesn't have the dash.

Thank you for your reply!
 
Upvote 0
Can there be a situation like

HSP-39026-4
HSP-39026-5
 
Upvote 0
Is this what you want

Book1
FGHIJK
7HSP-39026-4HSP-39026HSP-39026
8HSP-39019-5HSP-39019HSP-39019
9HSP-39019-4HSP-39019HSP-39019
10HSP-39016-4HSP-39016
11HSP-39015-4HSP-39015
12HSP-39009-4HSP-39009
13HSP-39043-4HSP-39043
14HSP-39042-4HSP-39042
15HSP-38076-4HSP-38076
16HSP-38075-4HSP-38075
17HSP-38066-4HSP-38066
18HSP-38065-4HSP-38065
Sheet1
Cell Formulas
RangeFormula
H7:H9H7=INDEX($K$7:$K$18,AGGREGATE(15,6,SEARCH($K$7:$K$18,F7)*SEQUENCE(COUNTA($K$7:$K$18)),1))


If this is your requirement than there is no point in doing vlookup or any lookup. The lookup value is the result itself. Only point is that one can check whether the value exist in the look-up table
 
Upvote 0

Forum statistics

Threads
1,214,870
Messages
6,122,019
Members
449,060
Latest member
LinusJE

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