Lookup and return multiple text values, approximate match

northw

New Member
Joined
Jun 3, 2021
Messages
9
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
  2. MacOS
Hello,
I've been tinkering with XLOOKUP function to bring up multiple values but I've not had much success. I need to lookup codes (fruit in the example below), which can have multiple values (all in the same column, but different cells), which need to be consolidated to a single cell and comma seperated. And to complicate things, values have other characters before/after. Any help is appreciated.

For example:

FruitImageFruitImages
AppleXyzBerry01AppleImgApple01, ImgApple02,ImgApple03
BerryImgApple01BerryXyzBerry01,XYzBerry02
OrangeImgApple02OrangeAbcOrange001,AxzOrange002
PearImgApple03MangoNNMango01
MangoXYzBerry02
AbcOrange001
AxzOrange002
NNMango01


Thank you!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
For your copy of XL365, give this formula a try...
Excel Formula:
=LET(g,HSTACK(A2:A6,MAP(A2:A6,LAMBDA(x,TEXTJOIN(", ",,FILTER(B2:B9,ISNUMBER(SEARCH(x,B2:B9))))))),FILTER(g,NOT(ISERROR(TAKE(g,,-1)))))
 
Upvote 0
Solution
I won't even try to understand this formula, but all I can say is that, it works! Thank you!
 
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,100
Members
452,301
Latest member
QualityAssurance

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