+ Reply to Thread
Results 1 to 7 of 7

Counting unique instances based on 2 criteria.

  1. #1
    Registered User
    Join Date
    01-10-2018
    Location
    Scotland
    MS-Off Ver
    Office 2013
    Posts
    16

    Counting unique instances based on 2 criteria.

    Hi

    I have been trying to solve this formula with COUNTIFS but I am not getting the desired result. I am looking to work out how many individual students have a "Y" in column E. Everytime I try and do this it counts all the "Y"s in column E. Each student has a unique reference in Column A. Could this be a FREQUENCY formula?

    I have attached a sample spreadsheet.
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Counting unique instances based on 2 criteria.

    There are a few ways to do this.

    Here's one:

    =SUMPRODUCT((J2:J281="Y")/COUNTIF(A2:A281,A2:A281&""))

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Counting unique instances based on 2 criteria.

    You could also use a pivot table (making sure to add the data to the data model) then use Distinct Count of SC Number under VALUES and FH Flag under ROWS.

  4. #4
    Registered User
    Join Date
    01-10-2018
    Location
    Scotland
    MS-Off Ver
    Office 2013
    Posts
    16

    Re: Counting unique instances based on 2 criteria.

    Hi Thanks for getting back to me.

    I have tried both solutions that you have advised but neither of them are working. With the formula it gives me a 0 result and with the pivot table it is counting all instances of "Y" with in column E. I only need the total number of students who have a "Y" in column E. Can you help further?

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Counting unique instances based on 2 criteria.

    Attached are both solutions posted in your sample.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-10-2018
    Location
    Scotland
    MS-Off Ver
    Office 2013
    Posts
    16

    Re: Counting unique instances based on 2 criteria.

    Humblest apologies - I had deleted a column and forgot to change the reference. Now worked a treat - many, many thanks for taking the time to help me.

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Counting unique instances based on 2 criteria.

    No worries. Happy to help.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Edit: Thanks for the rep!
    Last edited by 63falcondude; 09-11-2019 at 11:24 AM.

+ 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. Counting # of instances based on 3 criteria. sumproduct?
    By RubiksCuber in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-26-2018, 12:27 PM
  2. More help with counting unique cells based on criteria...
    By ChrisMattock in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-08-2018, 10:04 AM
  3. Counting unique instances based on certain criteria
    By heytherejem in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-11-2017, 08:12 AM
  4. Counting unique instances above a certain quantity
    By ammartino44 in forum Excel General
    Replies: 9
    Last Post: 10-03-2014, 03:04 AM
  5. Counting Unique Names based on Criteria
    By adamsiskin in forum Excel General
    Replies: 7
    Last Post: 08-15-2012, 04:55 PM
  6. Counting Unique Values based on several criteria
    By GowHow in forum Excel General
    Replies: 2
    Last Post: 04-25-2012, 10:16 PM
  7. Excel 2007 : counting unique users based on 2 criteria
    By fibaroobi in forum Excel General
    Replies: 2
    Last Post: 08-10-2010, 03:11 AM

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