+ Reply to Thread
Results 1 to 3 of 3

Count Unique Values based on another column

  1. #1
    Registered User
    Join Date
    07-02-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Count Unique Values based on another column

    Hi

    I am new to this Forum and hope somebody can help me. I need to count unique values based on another column example below

    Code Type
    N1234 NTU
    N1234 NTU
    N1234 BYU
    N1234 BYU
    N6789 NTU
    N8974 BYT
    B8974 BYT

    Code and type vary - I want to count the unique codes based on the type so for instance they would be 2 N1234 and not 4 because they are two types present.

    Can anybody help

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    21,528

    Re: Count Unique Values based on another column

    Assuming your data were in A2:B7, in C1 you have N1234

    D1: =SUMPRODUCT(--(A2:A7=C1),1/COUNTIFS(A2:A7,A2:A7,B2:B7,B2:B7))

    The above utilises COUNTIFS which is not compatible with versions of XL pre XL2007.

  3. #3
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Count Unique Values based on another column

    Another suggection is
    Please Login or Register  to view this content.
    See attachment.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, «Born in USSR»
    Vusal M Dadashev

    Baku, Azerbaijan

+ 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