Display a 1 for the first of duplicates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a list of records that have many duplicates. I need a formula that I
can use in the adjacent column to show a 1 for the first instance of a
duplicate and a 0 for any others. The list is sorted so all dupes are
together.
 
Try this formula:
=--(MATCH(A2,A:A,0)=ROW(A2))
and drag it down as required!

Regards,
Stefi


„noelle†ezt írta:
 
Use this formula in cell B3:

=IF(COUNTIF(C$3:C3, C3)=2, 1, 0)
Let me know if it works.
 
Note that the first solution above will flag the first occurence of each
value (duplicate or otherwise); the second solution will flag the second
occurence (=the first duplicate, literally). Choose the one that actually
matches your need.
 
Great, thanks. That worked!

Would you mind explaining the components so I understand how it works? It's
really been bugging me that I can't figure this out!

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top