简体   繁体   中英

List/Put together in one cell different looked up values

I would like to do the following:

From this input:

Product  Country
AA       BR
AA       UZ
BB       US
AA       IT
CC       RU
BB       MN

Obtain this table:

Product  List of countries
AA       BR, UZ, IT
BB       US, MN
CC       RU

Is there any formula combination that would achieve this (or something similar)?

Basically, I would like to find all the country values associated with one product and put them together.

Preferably without using VBA.

Thank you very much

As Pb comment you can try below in you have EXCEL-365 .

D2 =UNIQUE(A2:A7)
E2 =TEXTJOIN(", ",TRUE,FILTER($B$2:$B$7,$A$2:$A$7=D2))

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM