none
Can i count all tasks in a master plan? RRS feed

  • Question

  • Hi

    I think the title may tell the story here. I wanted to know is there a way of counting all tasks of all sub projects in a master plan? We are exporting to excel but sometimes think we may be missing some tasks.

    Regards

    steve

    Friday, July 20, 2012 11:32 AM

Answers

  • Steve TRW --
     
    Create a custom task Number field with the following formula in the field:
     
    [Task Count]
     
    When you create the field, be sure you select the Use Formula option in the Calculation for Task and Group Summary Rows section of the dialog.  Copy the custom Number field into each of the subprojects and into the master project as well.  Insert the field in the master project and then collapse each of the subprojects.  Be sure to display the Project Summary Task for the master project.  In the custom Number field, you will see the total number of tasks for each subproject and for the master project as well.  Hope this helps.
     

    Dale A. Howard [MVP]
    VP of Educational Services
    msProjectExperts
    http://www.msprojectexperts.com
    http://www.projectserverexperts.com
    "We write the books on Project Server"

    • Marked as answer by Steve.D.H Monday, July 23, 2012 2:07 PM
    Saturday, July 21, 2012 11:22 PM
    Moderator
  • Steve,

    If you don't mind using VBA, this macro at master level will put the grand total task count in the Number1 field of the master project Project Summary Task. Just be aware that the count will include the summary line insertion point tasks in the master. Depending on how you export the data to Excel, you may or may not want these tasks included. To NOT include them, just comment out the MastCount = ActivePRoject.Tasks.Count statement.

    Sub MstrCount()
    Dim t As Task
    Dim sp As Subproject
    Dim MastCount As Integer, subcount As Integer, totsubcount As Integer
    MastCount = ActiveProject.Tasks.Count
    For Each sp In ActiveProject.Subprojects
        subcount = sp.SourceProject.Tasks.Count
        totsubcount = totsubcount + subcount
    Next sp
    ActiveProject.ProjectSummaryTask.Number1 = MastCount + totsubcount
    End Sub

    John


    • Edited by John - Project Sunday, July 22, 2012 2:42 PM
    • Marked as answer by Steve.D.H Monday, July 23, 2012 2:08 PM
    • Unmarked as answer by Steve.D.H Tuesday, August 14, 2012 8:01 AM
    • Marked as answer by Steve.D.H Tuesday, August 14, 2012 8:01 AM
    Sunday, July 22, 2012 2:02 AM

All replies

  • Steve TRW --
     
    Create a custom task Number field with the following formula in the field:
     
    [Task Count]
     
    When you create the field, be sure you select the Use Formula option in the Calculation for Task and Group Summary Rows section of the dialog.  Copy the custom Number field into each of the subprojects and into the master project as well.  Insert the field in the master project and then collapse each of the subprojects.  Be sure to display the Project Summary Task for the master project.  In the custom Number field, you will see the total number of tasks for each subproject and for the master project as well.  Hope this helps.
     

    Dale A. Howard [MVP]
    VP of Educational Services
    msProjectExperts
    http://www.msprojectexperts.com
    http://www.projectserverexperts.com
    "We write the books on Project Server"

    • Marked as answer by Steve.D.H Monday, July 23, 2012 2:07 PM
    Saturday, July 21, 2012 11:22 PM
    Moderator
  • Steve,

    If you don't mind using VBA, this macro at master level will put the grand total task count in the Number1 field of the master project Project Summary Task. Just be aware that the count will include the summary line insertion point tasks in the master. Depending on how you export the data to Excel, you may or may not want these tasks included. To NOT include them, just comment out the MastCount = ActivePRoject.Tasks.Count statement.

    Sub MstrCount()
    Dim t As Task
    Dim sp As Subproject
    Dim MastCount As Integer, subcount As Integer, totsubcount As Integer
    MastCount = ActiveProject.Tasks.Count
    For Each sp In ActiveProject.Subprojects
        subcount = sp.SourceProject.Tasks.Count
        totsubcount = totsubcount + subcount
    Next sp
    ActiveProject.ProjectSummaryTask.Number1 = MastCount + totsubcount
    End Sub

    John


    • Edited by John - Project Sunday, July 22, 2012 2:42 PM
    • Marked as answer by Steve.D.H Monday, July 23, 2012 2:08 PM
    • Unmarked as answer by Steve.D.H Tuesday, August 14, 2012 8:01 AM
    • Marked as answer by Steve.D.H Tuesday, August 14, 2012 8:01 AM
    Sunday, July 22, 2012 2:02 AM
  • Dale,

    Thank-you i will give this a go as well as the macro john has suggested

    Regards

    Steve

    Monday, July 23, 2012 2:08 PM
  • John,

    Thank-you i will give this a go as well as the column Dale has suggested, i will see which suits us best.

    Regards

    Steve

    Monday, July 23, 2012 2:09 PM
  • Steve,

    You're welcome and thanks for the feedback.

    John

    Monday, July 23, 2012 2:50 PM
  • Here is the link to an article that I wrote on this subject last month.  Maybe it could help.

    http://www.lehnertcs.com/pdfs/201206_ezine.pdf


    Ellen Lehnert, MVP, PMP, MCT Training/Consulting/Author ellen@lehnertcs.com, www.lehnertcs.com Author "Managing Projects using MS Project 2010 desktop" courseware, www.MVP-Press.com

    Tuesday, July 31, 2012 1:58 AM
    Moderator