Home » excel » excel – Find duplicate and mark as 1st and rest of the dup mark with "Other Dups"

excel – Find duplicate and mark as 1st and rest of the dup mark with "Other Dups"

Posted by: admin May 14, 2020 Leave a comment

Questions:

I have an excel file that I need to make some changes. I need to identify the duplicate and then put “1st” in the series column for the first dup. For the remainder dups need to put “other dups” in the series column. Is it possible? I tried vlookup and match and nothing helped. =vlookup(a1,a2,0) , match(a1,a2,0), or even if(a1=a2,”found match”)

enter image description here

How to&Answers:

If data starts at A2 try this formula in B2 copied down

=IF(COUNTIF(A:A,A2)>1,IF(COUNTIF(A$2:A2,A2)=1,"1st","other dups"),"")

Answer:

If you want to see the occurrence instead of ‘1st‘ and ‘other dups‘, use the following formula in B2 copied down :

=IF(COUNTIF(A:A;A2)>1;COUNTIF(A$2:A2;A2);1)

Example:
enter image description here

The requirement is that column ‘A’ is sorted.