0

Hello in excel i have this tabel:

Column 1 Column 2
A A1
A A2
B B1
B B2

How do I get it to look like this:

Column 1 Column 2
A A1, A2
B B1, B2

So I want the unique items from column A and the items that belong to them from Column B seperated by a komma.

Harun24hr
  • 30,391
  • 4
  • 21
  • 36
Coderman
  • 159
  • 9

1 Answers1

0

You may try the following formula-

=LET(
x,UNIQUE(A2:A5),
y,BYROW(x,LAMBDA(l,TEXTJOIN(", ",1,FILTER(B2:B5,A2:A5=l)))),
HSTACK(x,y))

enter image description here

Harun24hr
  • 30,391
  • 4
  • 21
  • 36