logo
search
Others

How to Show the Number of Resources Assigned to Each Microsoft Project Task

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

Question details

The user needs a method to calculate and display the specific number of resources assigned to individual tasks in Microsoft Project, rather than viewing the project-wide resource total.

Product
Microsoft Project Online
Device & OS
not provided
Scenario
Managing task assignments and attempting to track the exact resource allocation count per task in Project Online.
Observed behavior
The user requires a custom field or view setup to show the exact resource count per task, which is not displayed in a flat column by default.
Before you start

Before you begin, ensure you have the Developer tab enabled in Microsoft Project if you plan to use the VBA method, and identify an unused custom Number field (such as Number1) to store your assignment counts.

Solution 1Recommended

Use a VBA Macro to Calculate Task Assignment Counts

The most precise way to show the number of resources assigned to each task is by using a short VBA macro to populate a custom Number field.

Microsoft Project does not have a default column that simply counts the resources per task. A simple VBA script can iterate through your project and count the assignments, placing the total into a custom field of your choice.

1
Open the VBA Editor

Open your project in Microsoft Project and press Alt + F11 to launch the Visual Basic for Applications (VBA) Editor.

2
Insert a New Module

In the VBA Editor, click on 'Insert' in the top menu and select 'Module' to create a blank script window.

3
Enter the Counting Script

Write a VBA script that loops through each task in the active project and sets a custom field, such as Number1, to equal the value of 'Task.Assignments.Count'.

4
Run the Macro

Press F5 or click the 'Run' button to execute the macro. The script will automatically calculate and populate the custom field with the resource count for each task.

5
Display the Custom Field

Return to your Gantt Chart view, right-click on a column header, select 'Insert Column', and choose 'Number1' (or your chosen field) to view the assignment counts.

Custom Field Selection: Make sure the custom field you select (e.g., Number1) is not already being used for other project calculations, as running the macro will overwrite existing data in that column.
Free Microsoft Office alternative

Manage Tasks and Resources Easily with WPS Spreadsheet

While Microsoft Project offers advanced VBA macros for resource management, it can be expensive and complex. If you need a simpler way to track tasks and assign resources, WPS Office is a free, lightweight alternative. You can easily manage project resource counts using pivot tables and functions in WPS Spreadsheet.

  1. 1. Create a Task Tracker: Open WPS Spreadsheet and list your project tasks in one column, and assigned resources in the adjacent column.
  2. 2. Use the COUNTIF Function: Use the =COUNTIF() formula to automatically tally the number of times a task appears, giving you an instant resource assignment count.
  3. 3. Visualize with Pivot Tables: Select your data and insert a Pivot Table to group tasks and sum up resources dynamically without any complex VBA coding.
Fully compatible with Microsoft Excel formats (.xlsx) for easy project tracking and sharing.Lightweight and completely free to use for daily task management and resource allocation.Built-in pivot tables and COUNTIF functions make tracking resource assignments effortless.Familiar, tabbed user interface ensures a seamless migration with zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Can I show resource counts in Microsoft Project without using VBA?

Yes, you can use built-in views like Task Usage and apply custom grouping by Task Number. However, this will simply organize the view visually and won't populate a single column with a flat count number like a VBA macro does.

Which custom field should I use for the VBA macro?

You can use any standard Number field available in Project, such as Number1 through Number20. Ensure the field you choose isn't already being utilized for other project formulas or integrations.

Does the VBA macro automatically update when I add new resources?

No, standard VBA macros need to be re-run manually every time you add or remove a resource assignment. To make it automatic, you would need to attach the macro code to a specific event trigger (like Project_Change) in the VBA editor.