+ Reply to Thread
Results 1 to 7 of 7

Count Nulls Groups by Group

Hybrid View

  1. #1
    Registered User
    Join Date
    08-18-2020
    Location
    London
    MS-Off Ver
    Outlook365
    Posts
    22

    Count Nulls Groups by Group

    Hi,

    I am looking for a way to only filter out groups where all their records are null. For instance, if a group has 10 records, but only 5 entries in the name column, the group should not be counted. If a group has 10 records, but no entries in the name column, the group should be counted.

    In the following example, we want to identify T350 and Cerbera only.
    Chimaera
    Chimaera Daniel
    Cerbera
    Tuscan Nate
    Tuscan Jade
    Tuscan Fox
    Tuscan Amaris
    Griffith Cody
    Griffith Joe
    Griffith
    T350
    T350
    Any ideas?

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,748

    Re: Count Nulls Groups by Group

    How about
    =ROWS(UNIQUE(FILTER(A2:A13,(COUNTIFS(A2:A13,A2:A13,B2:B13,"")=COUNTIFS(A2:A13,A2:A13)))))

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Count Nulls Groups by Group

    Personally, I'd use Pivot Table.

    Add first column as Row Label. Add Count of second column as Value field.

    Then right click on Row labels. And Filter -> Value Filter -> Count of column 2 = 0.

    Edit: If you need the other way around, just use filter for Count of column 2 greater than 0.
    "Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
    ― Robert A. Heinlein

  4. #4
    Registered User
    Join Date
    08-18-2020
    Location
    London
    MS-Off Ver
    Outlook365
    Posts
    22

    Re: Count Nulls Groups by Group

    Hi Fluff,

    The count you supplied works perfectly - however, I should apologise because the original post wasn't clear, because what we want to do is return the group value rather than return a count total.

    e.g.
    Cerbera
    T350

    Rather than 2.

    My apologies for the lack of clarity in the ask.

  5. #5
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,184

    Re: Count Nulls Groups by Group

    If you're looking for the number of groups that are blank, you should be able to use Fluff13's answer above. If you want the actual names, then just tweak his formula by removing the ROWS formula like this:

    =UNIQUE(FILTER(A2:A13,(COUNTIFS(A2:A13,A2:A13,B2:B13,"")=COUNTIFS(A2:A13,A2:A13))))

  6. #6
    Registered User
    Join Date
    08-18-2020
    Location
    London
    MS-Off Ver
    Outlook365
    Posts
    22

    Re: Count Nulls Groups by Group

    Thanks Greg - home run!

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,748

    Re: Count Nulls Groups by Group

    Glad to help & thanks for the feedback.

+ 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] Macro to generate groups randomly of 20 numbers, being 10 of group A and 10 of group B,
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-14-2017, 08:02 AM
  2. [SOLVED] (VBA) How Assign Column Cell To Corresponding Group, and Paste Group Cells into Groups WS?
    By eryksd in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-08-2016, 06:18 PM
  3. How to group multiple groups
    By ammartino44 in forum Excel General
    Replies: 1
    Last Post: 05-06-2014, 02:48 PM
  4. Group numbers into groups
    By arajkum in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2013, 02:47 PM
  5. group data into groups of 10
    By jmccarthy0901 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2013, 05:12 PM
  6. Is there a way to group within groups?
    By JB87 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-02-2013, 07:59 AM
  7. count the number of nulls for a specific employee
    By lb0224 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-21-2008, 11:40 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