Reputation: 25
I have a project like the image 1 :
And I want to keep only the first occurrence on column A and fill each row with the other occurrences, so the result will be like this image 2:
Can anyone help me? Thank you!
Upvotes: 0
Views: 45
Reputation: 152525
With a formula In your first output cell:
=IF(COLUMN(A:A)<=COUNTIF($A:$A,$C1),INDEX($B:$B,AGGREGATE(15,6,ROW($A$1:INDEX($A:$A,MATCH("ZZZ",$B:$B)))/($A$1:INDEX($A:$A,MATCH("ZZZ",$B:$B))=$C1),COLUMN(A:A))),"")
copy over and down till you get blanks.
Upvotes: 1