+ Reply to Thread
Results 1 to 10 of 10

How to count the number of values in one list that do not appear in another list

  1. #1
    Registered User
    Join Date
    04-03-2020
    Location
    NYC
    MS-Off Ver
    365 Pro Plus
    Posts
    72

    Thumbs up How to count the number of values in one list that do not appear in another list

    Hello,

    I have two lists of people with a # score on a test.

    In the attached workbook I highlight in yellow a cell where I need: The count of people in column 'B' that scored a 50 or lower which do not appear in the list of people in column 'E'.
    -The correct output should be 2, since 3 total people in 'B' don't appear in column 'E', however, only 2 of them scored a 50 or below.

    I imagine this is some sort of COUNTIF or SUMPRODUCT, but I can't seem to get the logic correct.

    Any help would be great - Thanks!
    Attached Files Attached Files
    Last edited by jk2391; 06-22-2023 at 10:53 AM.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,916

    Re: How to count the number of values in one list that do not appear in another list

    I added a helper column in D that is 0 when there is no match found in E for the name
    Attached Files Attached Files
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    04-03-2020
    Location
    NYC
    MS-Off Ver
    365 Pro Plus
    Posts
    72

    Re: How to count the number of values in one list that do not appear in another list

    Thank you - this works, but do you know of a feasible way to calculate the same thing without the use of a helper column?

    In the actual dataset I'm working with, an added helper column would corrupt my file, for a few different reasons.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,916

    Re: How to count the number of values in one list that do not appear in another list

    You could try and use te formula in that column as an extra formula criterium

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: How to count the number of values in one list that do not appear in another list

    Here is a solution without an helper, please try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,425

    Re: How to count the number of values in one list that do not appear in another list

    Since you are using XL365, this formula should give you the result you want...

    =SUM(ISERROR(MATCH(B6:B13,E6:E10,0))*(C6:C13<=50))

  7. #7
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,916

    Re: How to count the number of values in one list that do not appear in another list

    You got your answers

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,017

    Re: How to count the number of values in one list that do not appear in another list

    an alternative is with Power Query. Filter out those greater than 50 in each table then join the two tables in a Left Anti Join.

    Please Login or Register  to view this content.
    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

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

    Re: How to count the number of values in one list that do not appear in another list

    E2=sumproduct((isna(match(b6:b100,e6:e100,0)))*(c6:c100<=50)*(c6:c100<>""))

  10. #10
    Registered User
    Join Date
    04-03-2020
    Location
    NYC
    MS-Off Ver
    365 Pro Plus
    Posts
    72

    Re: How to count the number of values in one list that do not appear in another list

    Thank you for the help!

+ 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. Replies: 4
    Last Post: 05-23-2022, 02:15 AM
  2. [SOLVED] Formula to count the number of unique text values from a list.
    By PritishD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-28-2015, 05:42 AM
  3. Replies: 5
    Last Post: 03-27-2015, 08:07 AM
  4. [SOLVED] Count values from one list on another list
    By beesus311 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-02-2013, 04:32 AM
  5. Count only one order number in a list of values
    By david1987 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2013, 10:50 AM
  6. Count How Many Values From A List Appear In Another List
    By bowater in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2013, 09:35 AM
  7. [SOLVED] Look for values in a list, count and list in descending order
    By sans in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 05-15-2012, 09:16 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