+ Reply to Thread
Results 1 to 4 of 4

How to count number of sub groups under each main group

  1. #1
    Registered User
    Join Date
    05-08-2024
    Location
    Saudi Arabia
    MS-Off Ver
    Professional 2019
    Posts
    1

    How to count number of sub groups under each main group

    Capture.JPG

    I have excel sheet with 3 columns Groups, Sub groups, Sub Sub groups

    then, I have another table with list of main groups, where for each main group I want to count how many sub groups / sub sub groups are under.

    Main Group Sub Groups Main Group Count of sub groups
    A M1 A 2
    A M1 B 1
    A M2 C 3
    B U1 D 1
    B U1
    B U1
    C L3
    C L4
    C L5
    D L6

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

    Re: How to count number of sub groups under each main group

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,155

    Re: How to count number of sub groups under each main group

    Try, in E2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If that is a Table, it should AutoFill. If not, just copy down.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How to count number of sub groups under each main group

    Try this... which counts UNIQUE values, not ALL values:

    =SUM(--(FREQUENCY(IF(($A$2:$A$11=E2)*($B$2:$B$11<>""),MATCH($B$2:$B$11,$B$2:$B$11,0)),ROW($A$2:$A$11)-ROW(A2)+1)>0))

    see file.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

+ 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] Count number of groups who started doing a job
    By ebrauns79 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-05-2024, 04:48 AM
  2. Group number values into equal groups
    By thedunna in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-15-2024, 07:40 PM
  3. Count Nulls Groups by Group
    By FAU5T in forum Excel General
    Replies: 6
    Last Post: 10-06-2020, 07:53 AM
  4. Replies: 11
    Last Post: 11-19-2019, 11:36 PM
  5. Replies: 1
    Last Post: 06-04-2019, 03:46 PM
  6. Replies: 6
    Last Post: 06-03-2010, 04:25 AM
  7. how to create sub-groups within a main group
    By decipherZ in forum Excel General
    Replies: 0
    Last Post: 02-14-2006, 10:30 PM

Tags for this Thread

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