+ Reply to Thread
Results 1 to 3 of 3

How to use PivotTable to count records in various categories?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-26-2009
    Location
    Austin, TX
    MS-Off Ver
    Excel 2016
    Posts
    241

    How to use PivotTable to count records in various categories?

    Hello Everyone,

    I have about 15,000 records in a table. Each record has a field (in the column) called Staff Size.

    I'm looking for a relatively clean way to run the following report:

    Staff Size <5 : 203 records
    Staff Size 5-25: 1109 records
    Staff Size 26-50: 11949 records
    Staff Size: >50: 3456 records

    (no the figures don't add up properly -- just a quick example)

    I had thought & hoped that I could do this in a pivot table, but for the life of me, I can't figure out how. If someone could provide 15 fairly-specific steps to do that I'd be very grateful.

    I am aware, of course, that I can create a new column, and enter a formula that will assign each record to a Staff Size category, and then count the records assigned to each category....

    ...but, since I have many more similar analyses to run, I was rather hoping that there might be a cleaner, semi-automated way -- perhaps using pivottables.

    Any help would surely be appreciated!

    Jay

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: How to use PivotTable to count records in various categories?

    Hi
    take a look here...\
    Let me know, if this one is that what u'r lookin for...
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to use PivotTable to count records in various categories?

    You can only really "Group" when you have consistent intervals between your primary groups...in your case given you have 2 primary groups that span 20 & 25 you can't use Grouping on Staff Size.

    If you modified your buckets to say

    <5
    5-25
    26-45
    >45
    then you could set MIN to be 5 and MAX to be 45 with interval of 20 and that would create 4 buckets accordingly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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