Set up a condition so I know a task has more than one predecessor

Gregory Scharfstein
edited 12/09/19 in Smartsheet Basics

I would like to set up conditional formatting to highlight tasks that have more than one predecessor.

This becomes useful in using reports that do not properly display the predecessors.

 

Comments

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    You would need a "helper" column. I would suggest a checkbox type. In that column you would enter a formula that would check the box if there is more than one predecessor for the row. You would then base your conditional formatting off of that.

  • Thanks - good idea.

    I found a formula for the checkbox if my smartsheet contains less than 1000 rows:

    IF(LEN(predecessor)>3 ,1) 

    Do you have another suggestion?

     

     

    Thanks.

     

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    This should work as long as you also do not include fs, sf, ff, ss or any lag/lead time.

     

    I would recommend using a FIND function to look for the comma that is used to separate multiple predecessors.

     

    =IF(FIND(",", Predecessors@row) > 0, 1)

  • Thanks! I am not a coder ... so, this really helps.

    I also rarely use fs, sf, ff, ss ...

     

    I tried using the FIND but couldn't get it to work ... I did not know about the @row function and that was the problem.

     

    Thanks for your help!

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    Happy to help! yes

     

    The @row function basically replaces the row reference to tell the formula to look in the specified column on whatever row the formula is in.

     

    It provides a lot more flexibility and efficiency. The only time you really need to specify a row number is if you are referencing a cell on a row other than the row the formula is on.

     

    If you take my previous FIND formula and replace ONLY the column name itself with the appropriate column name, it should work for you.

     

    But as you said...

     

    If you rarely use sf, fs, etc, you don't use lag/lead time, and you don't exceed 1000 rows, there is no need for something like my formula. 

     

    Simply looking at the LEN will most certainly work. The only modification I would suggest is the @row reference. Assuming your column name is "predecessor" exactly (and not with the "s" on the end as in my previous example), the change would look like this...

     

    IF(LEN(predecessor@row)>3 ,1) 

    .

    Hopefully that helps explain the @row function.