Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A B
- 1 a x
- 2 a y
- 3 a z
- 4 b i
- 5 b h
- 6 b w
- A B C D
- 1 a x y z
- 2 b i h w
- ={UNIQUE(FILTER(A1:A, A1:A<>"")),
- ARRAYFORMULA(SPLIT(TRANSPOSE(
- QUERY(TRANSPOSE(IF(TRANSPOSE(
- QUERY(TRANSPOSE(
- QUERY({A1:B}, "select count(Col1)
- where Col1 !=''
- group by Col1
- pivot Col2", 0)),
- "select Col2, Col3", 0))>=1,
- QUERY({A1:B}, "select count(Col1)
- where Col1 !=''
- group by Col1
- pivot Col2
- limit 0"), ))&"♥", ,
- COLUMNS(IF(TRANSPOSE(
- QUERY(TRANSPOSE(
- QUERY({A1:B}, "select count(Col1)
- where Col1 !=''
- group by Col1
- pivot Col2", 0)),
- "select Col2, Col3", 0))>=1,
- QUERY({A1:B}, "select count(Col1)
- where Col1 !=''
- group by Col1
- pivot Col2
- limit 0"), )))), "♥ "))}
Add Comment
Please, Sign In to add comment