Drawing of Stakeholder map

Microsoft Project, Project planning, Templates and Advice

  • Concise, focused guide that cuts through the clutter
  • Step-by-step instructions for creating a project plan in under a day
  • Master essential skills like work breakdowns and task sequencing
  • Real-world troubleshooting for 20 common scheduling challenges
  • Rapidly get up to speed if you're new to Microsoft Project
  • Includes glossary, support resources, and sample plans
The cover of the book 'Essential Microsoft Project: The 20% You Need to Know'

Microsoft Project Counting Task Totals

By , MVP, PMP, MCT - Microsoft Project & Microsoft 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 Microsoft 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 Microsoft 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 Microsoft Project 2010 click on: Project > Customize Fields
(Using earlier levels of Microsoft 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)

create custom field in MS project
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.
custom field warning ms project
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. formula for custom field in ms project
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.
rollup calculation in ms project
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.

tasks grouped with a custom field containing a total of the subtasks

Count critical tasks in Microsoft 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.

Microsoft Project group by

ms project count critical tasks

To clear the Grouping click on View > No Group in Microsoft Project 2010 or Project > Group by > No Group in earlier Microsoft Project versions.

Count tasks by Location in Microsoft 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:

  1. Using Microsoft Project 2010 click on: View > Group > New Group by
  2. Using earlier levels of Microsoft Project click on: Project > Group by > More Groups > New
  3. Name: Location
  4. Group by: Location
  5. Click OK to close the box

To view the numbers of tasks occurring at each location apply the grouping.

  1. Using Microsoft Project 2010 click on: View > Group > Location
  2. Using earlier levels of Microsoft Project click on: Project > Group by > Location

  3. A screenshot of microsoft project plan with tasks grouped by location. The total number of tasks under each location is also shown

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.

filter tasks that contain a particular word in ms project

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.

  1. Using Microsoft 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 Microsoft Project click on: Project > Group by > More Groups > New

  2. Name: Weekly by Start date
  3. Group by: Start
  4. Define group intervals: Each Week
  5. Click OK to close the Define Interval box
  6. 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.

ms project count number of tasks in a week

To keep the customized fields, groupings, filters and all customized objects, copy the objects into your Global.mpt using the Organizer function.

  1. Using Microsoft Project 2010 click on: File > Info > Organizer
    Using earlier levels of Microsoft Project click on: Tools > Organizer
  2. Click on the tab along the top for the type of object you wish to copy
  3. Click on the object name on the right side of the view
  4. Click Copy to copy the object to your Global.mpt file
  5. Repeat until all objects are copied
  6. Click Cancel to close the Organizer box

Using the Clear Group button

Add the Clear Group button to the Quick Access bar in Microsoft Project 2010. This button can be found in the All Commands section of the Customize Quick Access bar.
  1. On the right side of the Quick Access bar click on the down arrow
  2. Click on More Commands
  3. In the Choose commands from select the All Commands
  4. Scroll down to Clear Group and click on it
  5. Click Copy
  6. 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

Microsoft Project can feel daunting to learn, but you only need to know the essentials to be amazingly effective! Get up to speed in less than a day with my book Essential Microsoft Project.

Written by the founder of stakeholdermap.com
  • Concise, focused guide that cuts through the clutter
  • Step-by-step instructions for creating a project plan in under a day
  • Master essential skills like work breakdowns and task sequencing
  • Real-world troubleshooting for 20 common scheduling challenges
  • Rapidly get up to speed if you're new to Microsoft Project
  • Includes glossary, support resources, and sample plans
The cover of the book 'Essential Microsoft Project: The 20% You Need to Know'

Read more guides on using Microsoft Project