none
Count the number of resources assigned to a task RRS feed

  • Question

  • John, here is one for you. I want to count the number of resources assigned to a task and it will be the number of commas +1 unless the resource names is blank. Do we have a text function for it in MSP?
    Monday, March 13, 2017 9:30 AM

All replies

  • Trevor,

    It sounds like you are trying to do this with a custom field formula. Unless someone is more creative than me, which is entirely possible, I don't see any way to do it with a single field. It could possibly be done using multiple fields but even that could get "messy". By far the easiest way to get the assignments count is with an extremely simple macro. In other words, why drive and take a boat to Australia when I can fly.

    Sub countRes()
    Dim t As Task
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            t.Number1 = t.Assignments.Count
        End If
    Next t
    End Sub

    John

    Monday, March 13, 2017 3:14 PM