IF Formula inquiry

This discussion was created from comments split from: Report showing parent task?.

Answers

  • SSFeatures
    SSFeatures ✭✭✭✭✭

    Hi @KBedal ,

    I just created a mock sheet and tested out some formulas. This sheet has task names, a "Level" column, and a "Description" column that concatenates the task names based on the parent's task names.

    This is the formula that I used for Level:

    =COUNT(ANCESTORS())
    

    This is the formula that I used for Description:

    =IF(
        Level@row = 0,
        [Task Name]@row,
        IF(
            Level@row = 1,
            [Task Name]@row + " - " + PARENT([Task Name]@row),
            [Task Name]@row + " - " + PARENT([Task Name]@row) + " - " + INDEX(ANCESTORS([Task Name]@row), Level@row - 1)
        )
    )
    

    You can modify this formula to add more IF statements, or join more task names.

    I hope this helps!

    Nathan Braun (Founder of SSFeatures) (nathan@ssfeatures.com)

    SSFeatures - The browser extension that adds essential features into Smartsheet.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!