unique comma separated values base on a text match

Country_Calc_2

New Member
Joined
Sep 16, 2023
Messages
27
Office Version
  1. 365
Platform
  1. Windows
I want to return unique text values (comma separated) from column B searching each matching value in column A, the value in column A.

Columns D and E will only have 1 instance of column A value.


ABCDE
Alzheimer's DiseaseBGR, CHL, CZE, FRA, DEU, ITA, POL, SRB, SVK, ESP, UKR, GBR, USAAlzheimer's DiseaseARG, AUS, BGR, CAN, CHL, GBR, HRV, CZE, FRA, DEU, ITA, KOR, MYS, POL, SRB, SGP, SVK, ESP, UKR, GBR, USA, TWN
Alzheimer's DiseaseARG, AUS, BGR, CAN, CHL, HRV, CZE, FRA, DEU, ITA, KOR, MYS, POL, SRB, SGP, SVK, ESP, TWN, GBR, USAVascular DementiaARG, AUS, BGR, CAN, CHL, HRV, CZE, FRA, DEU, ITA, NLD, RUS, SGP, ESP, TWN, GBR, USA
Vascular DementiaARG, AUS, BGR, CAN, CHL, HRV, CZE, FRA, DEU, ITA
Vascular DementiaNLD, ROU, RUS, SGP, ESP, TWN, GBR, USA
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
How about
Excel Formula:
=TEXTJOIN(", ",,SORT(UNIQUE(TEXTSPLIT(TEXTJOIN(", ",,FILTER(B2:B100,A2:A100=D2)),,", "))))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,225,487
Messages
6,185,270
Members
453,285
Latest member
Wullay

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