+ Reply to Thread
Results 1 to 5 of 5

Count Unique Items

  1. #1
    Registered User
    Join Date
    01-09-2009
    Location
    powell, ohio
    MS-Off Ver
    Excel 1997
    Posts
    24

    Count Unique Items

    Hi All,

    I have a simple question. I have a worksheet that has 2 columns and need to count the unique items. See Below. Column A i = Customer, Column B = Tier, Result is the count where I need formula

    A B Result

    ABC 1 1
    ABC 1 0
    ABC 2 1
    DEF 3 1
    DEF 3 0
    DEF 1 1

    Thanks

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Count Unique Items

    Here is one solution attached.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Count Unique Items

    Assuming your data is sorted as your post suggests
    In C2
    Please Login or Register  to view this content.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    01-09-2009
    Location
    powell, ohio
    MS-Off Ver
    Excel 1997
    Posts
    24

    Re: Count Unique Items

    Hi,

    Your formula =IF(OR(A2<>A1,B2<>B1),1,0) works if you don't have a repeat of Customer & tier later in the list. For example if you add an additional Customer at the bottom of the list:

    DEF 3 , it will count as addition. It needs to not count since it was already counted 3 rows up.

    Thanks,

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Count Unique Items

    The point was that the data appeared sorted, if it isn't then that's a different problem.

    alansidmans' solution might be the way to go.

    If not, can you post a typical sample workbook that better illustrates your problem?

+ 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