MS Project Counting Task Totals
By
Ellen Lehnert, MVP, PMP, MCT - MS Project & MS Project Server
When managing project schedules Project Managers often need to produce a count of various tasks. For example: How many late tasks are in a schedule, how many critical tasks, how many milestones, etc. There is a way to have MS Project count these tasks (Ellen Lehnert).
To allow a count to occur and accumulate you will need to create a customized field with a formula, insert that column into a task table and then apply groupings and filters.
All versions of MS Project have this ability to create customized fields with formulas. In the example below you will first create a customized number field, apply '1' into the formula, and set a roll-up value to Sum the column value.
Count the number of tasks under each summary task
-
Using MS Project 2010 click on: Project > Customize Fields
- (Using earlier levels of MS Project, click on: Tools > Customized Fields > Fields)
- To create and rename a customized Number field to be called 'Count' click on:
Type > Number > Number1 (or any unused number field)
> Rename > Enter 'Count' > OK (See below)
- After the field has been created, click on Formula in the Custom attributes section and click OK to accept the warning message that all existing values will be discarded from the selected field.
- Enter 1 for the formula in the box at the top of the view, click OK to close the box and OK again to accept another warning message.
- This action will place a 1 in for each detail and milestone task in the Count Field for your project.
Note: In the view below the vertical line to the right of the number 1 is the cursor.
- The last step is to click on Rollup and select Sum in the 'Calculation for task and group summary rows' section. Then click OK to close the Customized field box.
- Insert the Count column into any task table view and you will note the accumulated value on the summary rows.
In the example below Outline Level 1 was applied:
- View > Outline > Outline Level 1
.
You will notice that there are 5 tasks in the Scope section and 9 tasks in the Analysis/Software Requirements section. The Project Summary task Software Development is displaying total 74 detail and milestone tasks contained in the project schedule and is not counting summary tasks.
Count critical tasks in MS Project
If you want to know how many critical tasks are in your project schedule, apply the Critical grouping View > Group by:'Critical', then adjust the Outline Level to Outline Level 1; you can easily see the count of the number of tasks in each category.

To clear the Grouping click on View > No Group in MS Project 2010 or Project > Group by > No Group in earlier MS Project versions.
Count tasks by Location in MS Project
In the example below I have created a customized field called Location and populated it with some city names. I then created a Grouping called Location and applied the new group. The steps to create the new Group are:
- Using MS Project 2010 click on: View > Group > New Group by
- Using earlier levels of MS Project click on: Project > Group by > More Groups > New
- Name: Location
- Group by: Location
- Click OK to close the box
To view the numbers of tasks occurring at each location apply the grouping.
- Using MS Project 2010 click on: View > Group > Location
- Using earlier levels of MS Project click on: Project > Group by > Location
More task count information can be gained by applying filters. Some useful filters for this purpose could be Late tasks, Critical tasks, Uncompleted tasks, Milestone tasks, Over budget tasks, Should have started tasks, etc. After a filter is applied you can then apply an outline level to view totals.
Another filtering idea is to filter by value within a column. For example, you might want to know how many tasks contain the word 'Develop' by location. Using the location group created above apply the group and apply a custom filter View > Filter: > New Filter which contains the word 'Develop' and then apply Outline Level 1. Notice in the example below the number of occurrences per location has changed.
Group tasks by week
One more idea is to group tasks by week and find out how many tasks should be starting in weekly timeframes.
- Using MS Project 2010 click on the Start column and select: Group by > Week to create the grouping quickly. You may also click on: Project > Group by > New Group by and create a grouping object.
Using earlier levels of MS Project click on: Project > Group by > More Groups > New
- Name: Weekly by Start date
- Group by: Start
- Define group intervals: Each Week
- Click OK to close the Define Interval box
- Click OK to close the Group box.
Group tasks by week and count the number of tasks in each week
Below is an example of a weekly grouping with the count for number of tasks scheduled by week.
To keep the customized fields, groupings, filters and all customized objects, copy the objects into your Global.mpt using the Organizer function.
- Using MS Project 2010 click on: File > Info > Organizer
Using earlier levels of MS Project click on: Tools > Organizer
- Click on the tab along the top for the type of object you wish to copy
- Click on the object name on the right side of the view
- Click Copy to copy the object to your Global.mpt file
- Repeat until all objects are copied
- Click Cancel to close the Organizer box
Using the Clear Group button
Add the Clear Group button to the Quick Access bar in MS Project 2010. This button can be found in the All Commands section of the Customize Quick Access bar.
- On the right side of the Quick Access bar click on the down arrow
- Click on More Commands
- In the Choose commands from select the All Commands
- Scroll down to Clear Group and click on it
- Click Copy
- Click OK to close the box
You can add more buttons to the Quick Access bar if the bar is below the ribbon bars.
Clear Group is also a button in earlier versions that may be added to a toolbar.
About the author
Ellen Lehnert, Principle, is a Microsoft Project MVP (Most Valuable Professional), a PMP (Project Management Professional) and MCT (Microsoft Certified Trainer). LehnertCS.com
Publish your article on stakeholdermap.com
Read more guides on using Microsoft Project