+ Reply to Thread
Results 1 to 5 of 5

Count unique records with criteria

  1. #1
    Registered User
    Join Date
    06-16-2010
    Location
    Minnetonka, MN
    MS-Off Ver
    Excel 2010
    Posts
    43

    Count unique records with criteria

    Hey everyone,

    Here is my situation. I am trying to count the number of unique customer in a set of data but I need to have some criteria involved to filter down. Here is an example of the data I have:

    Column A - Customer Number (ex. 1,2,3,4,5,etc.)
    Column B - Location (ex. MN,TX,MI,WA,etc.)
    Column C - Month (ex. Jan, Feb, Mar,etc.)

    The formula I've been using to count the unique values is:

    =SUM(IF(FREQUENCY(A:A,A:A)>0,1))

    This works fine for the total number of unique customers but I need to know for example the number of unique customers in MN in Jan. Is there a variation to this formula that would solve that or a different formula all together? Any help would be much appreciated. Thanks!
    Last edited by vancoservices; 08-24-2010 at 09:14 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Count unique records with criteria

    Something like:

    Please Login or Register  to view this content.
    with fixed ranges (not full columns) - adjust ranges to suit and then confirm with CTRL+SHIFT+ENTER
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-16-2010
    Location
    Minnetonka, MN
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Count unique records with criteria

    Thanks NBVC, that worked great. However...... I just found another criteria I need to add that I didn't include before. Column D has size (xs, s, m, l, xl) and I'm assuming I would just add another IF in the middle to include that, but here's the issue. I only want to count if the size is "s, m, or l" not "xs or xl". How would that be added? Thanks

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Count unique records with criteria

    Try:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER

  5. #5
    Registered User
    Join Date
    06-16-2010
    Location
    Minnetonka, MN
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Count unique records with criteria

    Thanks, the formula works awesome! Much appreciated!

+ 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