+ Reply to Thread
Results 1 to 3 of 3

Unique formula that also counts non-unique once

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    46

    Unique formula that also counts non-unique once

    I need to find unique IDs and the first or one instance of non-unique and dates using the below sample set of data.

    I was using a UDF that used find to count the first instance of a non-unique id+date but for a large amount of data this is slow and was also unreliable. If an ID has a unique ID and date it gets a "Y" if an ID is non-unique with a unique date it gets a "Y", if an ID is non-unique with a non-unique date it needs to be counted once with "Y" and the other of its matches as "N". Also needs to account for "[NULL]" dates.

    The final column is an sample of results I would like to see. I can include my UDF but it did not work well and I would like to see if someone has any insight beyond that.

    ID Date Unique Formula
    10001 1/1/2012 Y
    10002 2/30/2012 Y
    10030 4/30/2011 Y
    40000 6/10/2012 Y
    10001 1/1/2012 N
    10002 1/3/2012 Y
    40000 6/10/2012 N
    12345 [NULL] Y
    10001 1/1/2012 N

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Unique formula that also counts non-unique once

    With your sample data in A1:B10

    This regular formula begins the flagging of first instances of A:B combinations
    Please Login or Register  to view this content.

    Copy that formula down through C10

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    11-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Unique formula that also counts non-unique once

    Ron. this is beautiful!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1