Vlookup - Find partial match from the lookup_value

Clayton18

New Member
Joined
Dec 11, 2023
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi All!

Im trying to see if its possible to use vlookup to find partial matches with the lookup value

For example:

The lookup value is a long string of data - i'm trying to match the return array to each value, however my lookup array only displays one part of the value.

1709270893790.png



Thankyou!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Like this perhaps?

ABCDE
1
212322Pink12345 - Australia - 93847Grey
35555Yellow34643 - 5555 - LondonYellow
493847Grey12322 - Paris - 1111Pink
512322 - Blah - 5555Pink,Yellow
6111 - New York -222n/a
Sheet1
Cell Formulas
RangeFormula
E2:E6E2=TEXTJOIN(",",,(FILTER(B$2:B$4,ISNUMBER(FIND(A$2:A$4,D2)),"n/a")))
 
Upvote 0
For the future , I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. ;)

Not sure if you can have data like rows 6 & 7 below but this is my suggestion. In some circumstances it has a couple of differences in results (inclusions and order) compared to Stephen's formula, which I have included below for comparison.

24 03 01.xlsm
ABCDEF
1
2PeterStephen
312345 - Australia -93847GreyGrey12322Pink
434643 - 5555 - LondonYellowYellow5555Yellow
512322 - Paris - 1111PinkPink93847Grey
65555 - XXX - 12322Yellow, PinkPink,Yellow
755556 - XXX - 12322PinkPink,Yellow
812345 - Australia -93848 n/a
Lookup
Cell Formulas
RangeFormula
B3:B8B3=TEXTJOIN(", ",1,XLOOKUP(TRIM(TEXTSPLIT(A3,"-")),E$3:E$5,F$3:F$5,""))
C3:C8C3=TEXTJOIN(",",,(FILTER(F$3:F$5,ISNUMBER(FIND(E$3:E$5,A3)),"n/a")))
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,114
Members
453,021
Latest member
Justyna P

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