Leave blank if row level < 2

I have a column formula with several nested IF statements.

I want to add a condition at the start which says "If row is level 0 or 1, leave this blank; otherwise, run the rest of the formula."

So I think I need something like this:

=IF(LEVEL(Code@row < 2, "", [insert the rest of the formula here, starting with IF]))

But it says that my syntax isn't right - what am I missing?

Thank you!

Tags:

Best Answer

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭
    Answer ✓

    Hi @malden

    The LEVEL function doesn't exist, so this is what is causing your error.

    You could use something like:

    =IF(COUNT(ANCESTORS([Another column here]@row))<2,"",<remainder of your formula>)

    For [Another column here], just pick any column that isn't the one with your formula in, else it won't display anything.

    Example:

    Hope this helps, but if you've any problems/questions then just post!

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!