user2409512
user2409512

Reputation: 25

Find duplicated values in a column and extract the data in the same row to the first occurence

I have a project like the image 1 :

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:

image2

Can anyone help me? Thank you!

Upvotes: 0

Views: 45

Answers (1)

Scott Craner
Scott Craner

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.

enter image description here

Upvotes: 1

Related Questions