vlookup in a cell with comma separated values returned in another comma separated value

jtambard

New Member
Joined
Apr 8, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello,

Is is possible to do a vlookup in a cell with comma separated values and return it in another comma separated value (in red)
example :
I want top obtain Col B result vlooking up in second table. Your help is the most welcome.
Thanks
Jacques.

AB
1GERMANY,SPAIN,FRANCEDE,SP,FR
2FRANCE,ARGENTINAFR,AR
3DENMARKDK

Vlookup table :
ARGENTINAAR
GERMANYDE
FRANCEFR
SPAINSP
DENMARKDK
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
ABCDEFG
1
2GERMANY,SPAIN,FRANCEDE, SP, FRARGENTINAAR
3FRANCE,ARGENTINAFR, ARGERMANYDE
4DENMARKDKFRANCEFR
5SPAINSP
6DENMARKDK
Main
Cell Formulas
RangeFormula
B2:B4B2=TEXTJOIN(", ",,INDEX($G$2:$G$6,MATCH(FILTERXML("<k><m>"&SUBSTITUTE(A2,",","</m><m>")&"</m></k>","//m"),$F$2:$F$6,0)))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
ABCDEFG
1
2GERMANY,SPAIN,FRANCEDE, SP, FRARGENTINAAR
3FRANCE,ARGENTINAFR, ARGERMANYDE
4DENMARKDKFRANCEFR
5SPAINSP
6DENMARKDK
Main
Cell Formulas
RangeFormula
B2:B4B2=TEXTJOIN(", ",,INDEX($G$2:$G$6,MATCH(FILTERXML("<k><m>"&SUBSTITUTE(A2,",","</m><m>")&"</m></k>","//m"),$F$2:$F$6,0)))
Thank you so much, this was very helpful Can you suggest the same formula without repetation
 
Upvote 0
Please start a thread of your own for this question & post some sample data. Thanks
 
Upvote 0
Alternate Formula that works on Excel Mac:
=TEXTJOIN(", ",TRUE,XLOOKUP(TEXTSPLIT(SUBSTITUTE(C4," ",""),","),range_to_search,range_to_insert,"",0,1))

where range_to_search is a range of cells and range_to_insert is same size range with corresponding values to insert in output.

The separator in TEXTSPLIT and TEXTJOIN an be customized to suite need.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
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