Results 1 to 5 of 5

Thread: How do I identify duplicate IDs and assign values

  1. #1

    How do I identify duplicate IDs and assign values



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I need to identify duplicate records based on unique ID number and assign a value 1 to the first occurance and 0 to the rest. Here is an example:
    ID Assign
    01 1
    01 0
    01 0
    02 1
    02 0
    02 0
    02 0

    Thank you,

    Helal

  2. #2
    Acolyte eisayev's Avatar
    Join Date
    Oct 2012
    Location
    Baku, Azerbaijan
    Posts
    33
    Articles
    0
    =IF(COUNTIF($A$2:A2;A2)=1;COUNTIF($A$2:A2;A2);0)
    paste the formula to the first row ( under the assign column) and drop it down
    good luck

  3. #3
    Thank you...but I get error on so I replaced ; with , and it worked.

  4. #4
    Conjurer CheshireCat's Avatar
    Join Date
    Dec 2011
    Location
    Victoria, Canada
    Posts
    121
    Articles
    0
    Excel Version
    Microsoft Excel 2013
    Another way:

    Code:
    =IF(COUNTIF($A$2:A2;A2)=1,1,0)

  5. #5
    Acolyte eisayev's Avatar
    Join Date
    Oct 2012
    Location
    Baku, Azerbaijan
    Posts
    33
    Articles
    0
    same logic but a bit shorter version
    Thanx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •