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



## jtambard (Apr 8, 2022)

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.


*A**B**1*GERMANY,SPAIN,FRANCE*DE,SP,FR**2*FRANCE,ARGENTINA*FR,AR**3*DENMARK*DK*

*Vlookup table : *

ARGENTINAARGERMANYDEFRANCEFRSPAINSPDENMARKDK


----------



## Fluff (Apr 8, 2022)

Hi & welcome to MrExcel.
How about
+Fluff 1.xlsmABCDEFG12GERMANY,SPAIN,FRANCEDE, SP, FRARGENTINAAR3FRANCE,ARGENTINAFR, ARGERMANYDE4DENMARKDKFRANCEFR5SPAINSP6DENMARKDKMainCell FormulasRangeFormulaB2:B4B2=TEXTJOIN(", ",,INDEX($G$2:$G$6,MATCH(FILTERXML("<k><m>"&SUBSTITUTE(A2,",","</m><m>")&"</m></k>","//m"),$F$2:$F$6,0)))


----------



## jtambard (Apr 8, 2022)

A big thank you Fluff ! This was of great help !
???


----------



## Fluff (Apr 8, 2022)

You're welcome & thanks for the feedback.


----------



## Sbalan (Yesterday at 10:35 AM)

Fluff said:


> Hi & welcome to MrExcel.
> How about
> +Fluff 1.xlsmABCDEFG12GERMANY,SPAIN,FRANCEDE, SP, FRARGENTINAAR3FRANCE,ARGENTINAFR, ARGERMANYDE4DENMARKDKFRANCEFR5SPAINSP6DENMARKDKMainCell FormulasRangeFormulaB2: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


----------



## Fluff (Yesterday at 10:41 AM)

Please start a thread of your own for this question & post some sample data. Thanks


----------

