Quick Links

counting the number of predecessors

Home Forums Discussion counting the number of predecessors

  • This topic is empty.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
  • #398928 Reply


    I am looking to find a way to use a graphical indicator to show those projects with high numbers of predecessors or successors as I want to be able to easily spot pinch points; but I cant figure out the formula.

    Can anyone help?

    #398939 Reply
    Larry Christofaro

    First obvious question, are you using Project Server and do you want to see that at the project level? If so you can with a bit of knowledge (not technical). You will also need a defined formula more than “high numbers”. I can lay out a description if I’m on the right track.

    #398984 Reply

    Thanks for the offer of support!!!! Im using a stand alone MS project 2010. Ive lots of projects listed, each with numerous tasks underneath and Im using this to monitor all the interdependencies etc and the overall portfolio timeline. This is working well. There are many tasks though that have high numbers of predecessors or successors and I want to be able to use a graphical indicator in a custom field to pick out those activities with more than, say 8 predecessors as red or more than 5 as amber. Same for successors. Im new to project though and this formula defeats me.

    Very grateful for any support

    #398994 Reply
    Larry Christofaro

    That makes sense. You might be able to do this using VBA but nothing out of the box. I’m not the VBA expert but hopefully someone can answer this better for you.

    #399027 Reply
    Tim Jones

    Following up on Larry’s suggestion of a VBA solution, here’s a possible first step:

    Create a custom number field ([Number20] for this example) with the following formula: Len([Predecessors])

    It will return the number of characters in the string from the predecessor field.

    Then you can use a formula like the following and add graphical indicators to flag the pinch points with a RED stoplight indicator:

    Switch([Number20]<10,”GREEN”,[Number20]>=10 And [Number20]<=20,”YELLOW”,[Number20]>20,”RED”)

    You can adjust the formula depending on the number of lines in your schedule.

    #399028 Reply
    Tim Jones

    The formula and graphical indicators are in a separate custom text field.

    #399031 Reply
    Larry Christofaro

    Creative…I like it!!

    #399072 Reply

    That totally works – you are amazing!!! Thank you so much xxx

    #408815 Reply
    Tim Jones

    Update: This formula is better than the Len([Predecessors]) formula from my initial reply:


    The Len([Predecessors]) formula returns a count that includes the commas in the string; the new formula removes the commas, adds “1” (because there will be one more predecessor than there are commas), and then takes the difference, returning the exact number of predecessors.

    I’m updating this so long after the original post because I recently had a need to use this formula and did a little more searching to find a way to get the exact number of predecessors:)

    #409733 Reply
    Tony K

    Tim, thanks for sharing the formula(s) above. Everything works perfectly except the formula you posted on 2/10/2017. Is there something missing from that formula? Any guidance you can provide would be great. Thank you

    #410202 Reply
    James Martin

    Using Project Pro 2013 stand alone. My solution took me down this path & revised formula.


    Try that one… It appears to be a syntax issue, replace comma with semi colon and double quotes with single quotes. Original logic is correct.

    #410269 Reply
    Timothy Jones

    Thanks James – looks like a difference between 2013 and 2010 (I’m using 2010 stand alone).

    Tony – Sorry I didn’t see this when you posted – hope you have it working now.

    #413297 Reply
    Minerva Goree

    Below is the formula that worked for me. I’m using MSP Server 2016.


Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: Reply #399028 in counting the number of predecessors
Your information: