# Count row when group

• ### Question

• Is there a field or formula to count how many rows are in each grouping? I need to count how many tasks that I schedule each week. I create a group by date (Interval week) but I currently count in manually.
Thursday, March 1, 2012 1:47 PM

• Mimi,

There is no formula that you can enter to count the number of members of a grouping which you create.  It is not like Excel where you have COUNT, COUNTA, COUNTIF, etc.

You could run a Macro to get this information.  Get Rod Gill's book on VBA programming - it is a great resource.

Gregg D. Richie, PMP, MCTS; Author, Microsoft Project 2010, Microsoft Official Academic Course Series

Thursday, March 1, 2012 2:06 PM
• Enter the value "1" into a custom number field as formula and set as follows in Custom Fields dialog box: Calculation for task and group summary rows | Rollup <Sum>. Insert the custom number field to the table and the value in the group header line will display the sum of ones.
Thursday, March 1, 2012 2:57 PM

### All replies

• Mimi,

There is no formula that you can enter to count the number of members of a grouping which you create.  It is not like Excel where you have COUNT, COUNTA, COUNTIF, etc.

You could run a Macro to get this information.  Get Rod Gill's book on VBA programming - it is a great resource.

Gregg D. Richie, PMP, MCTS; Author, Microsoft Project 2010, Microsoft Official Academic Course Series

Thursday, March 1, 2012 2:06 PM
• Enter the value "1" into a custom number field as formula and set as follows in Custom Fields dialog box: Calculation for task and group summary rows | Rollup <Sum>. Insert the custom number field to the table and the value in the group header line will display the sum of ones.
Thursday, March 1, 2012 2:57 PM
• I added Number 1 field to a table. On Calculation for task and group summary rows, I select Roll up - Count All. At the header of group and sub-group, it now shows row counted for each grouping.
Thursday, March 1, 2012 4:19 PM
• Thank you for feedback. I guess that's even better.

Regards.

Thursday, March 1, 2012 5:46 PM