+ Reply to Thread
Results 1 to 6 of 6

count formula for unique ids that meet multiple criteria

  1. #1
    Registered User
    Join Date
    04-01-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 365
    Posts
    27

    count formula for unique ids that meet multiple criteria

    hello,

    my table looks like this:

    table 1.PNG


    i would like to use formulas to count the number of unique ids, based on org and recognition type. end result would look like this:

    table 2.PNG

    notice that id Z0044444, in org SHS SP, is only counted once in the point based reward column, even though this id received two separate awards. i only want it counted once. same with id Z0088888, in org SHS MM, in the point based reward to my direct reports column.

    i've tried COUNTIFS combined with a SUMPRODUCT but that doesn't seem to be doing the trick. thank you in advance for any tips.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,379

    Re: count formula for unique ids that meet multiple criteria

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    04-01-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 365
    Posts
    27

    Re: count formula for unique ids that meet multiple criteria

    sample workbook now attached. sorry about that.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,864

    Re: count formula for unique ids that meet multiple criteria

    Perhaps the following will help.
    Add a column, which may be moved and/or hidden for aesthetic purposes, to the source data.
    Populate the added column using: =COUNTIFS(B$2:B2,B2,C$2:C2,C2)
    Produce a pivot table with Org in the rows field, Recognition_Type_Name in bot the columns and values field and use the new column as a filter (filtering on the value of 1)
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,813

    Re: count formula for unique ids that meet multiple criteria

    Headers must be the same as in the file
    attached.

    The headers in your file did not have a "-".

    I copied and pasted them from the table.



    F2=IF($E2<>"",SUM(IF(FREQUENCY(IF($B$2:$B$100=$E2,IF($C$2:$C$100=F$1,MATCH($A$2:$A$100&$B$2:$B$100,$A$2:$A$100&$B$2:$B$100,0))),ROW($A$2:$A$100)-ROW($A$2)+1),1)),"")


    Control+shift+enter

    copy down
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,379

    Re: count formula for unique ids that meet multiple criteria

    Are you still using Excel 2010 or something newer? If you are using a new version, then attached is a simple pivot achieved with PowerQuery.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula to count number of occurrences that meet multiple criteria
    By Losguapos1 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-13-2018, 07:38 AM
  2. [SOLVED] Sum Count unique ID if meet the criteria
    By ieyfan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-12-2018, 04:55 AM
  3. Count Unique Values that Meet a Criteria
    By DD1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-09-2016, 11:23 PM
  4. Replies: 7
    Last Post: 11-08-2014, 04:05 PM
  5. Replies: 25
    Last Post: 05-31-2012, 08:03 PM
  6. Replies: 5
    Last Post: 03-13-2012, 06:05 AM
  7. How to count unique entries that meet two criteria
    By Gooford in forum Excel General
    Replies: 2
    Last Post: 11-23-2010, 12:13 PM

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