+ Reply to Thread
Results 1 to 8 of 8

Count of row groupings

  1. #1
    Registered User
    Join Date
    08-28-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Count of row groupings

    G'day forum,

    was hoping someone can help me with with this problem.

    My sheet contains 2 columns, id and document:
    ID Document
    1 doctype1
    1 doctype2
    2 doctype1
    2 doctype2
    3 doctype3
    4 doctype3
    5 doctype1
    5 doctype2
    How can i count the number of distinct IDs that have a particular set of doctypes?
    e.g., 3 IDs have doctype 1 & 2 and 2 IDs have doctype3.
    thanks

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Count of row groupings

    if I'm understanding your issue it seems a countif formula would work where you might set up a distinct list of the doctypes then do a countif of those types. Am I missing something?

    EDIT: So I put your distinct list of doc types in col D then in col E =countif(B:B,E1) seemed to work.
    EDIT2, put your list as typed in col A and col B then made the distinct list in col D etc as noted above.
    Last edited by Sam Capricci; 08-28-2013 at 06:54 PM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    08-28-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Count of row groupings

    Thanks Sambo kid.
    that gives a count of how may id have doctype1 or doctype2 etc.
    What i need is something at will show how many ID have both doctype1 and doctype2

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Count of row groupings

    So you want doctype1 and doctype2 to be combined but doctype3 to be counted separately, right?

  5. #5
    Registered User
    Join Date
    08-28-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Count of row groupings

    yep, thats right

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Count of row groupings

    Sorry for delaying my response, working from home on my iMac and excel for apple is a nightmare, not as many functions. Anyway, thinking about it if I needed to do it I would probably set up a helper column so in say col C, put in an if then stmt like
    =if(B2="doctype3","C","A&B") then do a countif stmt in col D of the A&B and C in column C.
    Tried it and it worked. It may not be the most elegant way and there may be a way using index or sumproduct to do it but offhand I can't think of another way.

  7. #7
    Registered User
    Join Date
    08-28-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Count of row groupings

    that's great, i appreciate your help!

  8. #8
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Count of row groupings

    Sure, and thanks for the reputation points.

+ 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. Calculate groupings
    By cmf0106 in forum Excel General
    Replies: 5
    Last Post: 11-10-2009, 02:27 PM
  2. Scattergraph groupings
    By juliaa in forum Excel General
    Replies: 1
    Last Post: 11-10-2009, 02:18 PM
  3. Help in Groupings
    By arvi in forum Excel General
    Replies: 3
    Last Post: 04-28-2009, 07:55 AM
  4. [SOLVED] Excel should allow tab groupings.
    By Bassam Abdul-Baki in forum Excel General
    Replies: 12
    Last Post: 06-03-2006, 02:10 AM
  5. Groupings within PivotTables
    By Fred in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-18-2005, 07:05 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