#Invalid Column Value

I have this formula that is working correctly. I just want to add an IFERROR or IF(ISBLANK) to the formula so when the child row is blank, the parent row that this formula is in, will be blank until the child row has data entered. Below is the formula I am currently using.

=INDEX(CHILDREN([Movment History]@row), COUNT(CHILDREN([Movment History]@row)))

Best Answer

  • KPH
    KPH Community Champion
    Answer ✓

    I wonder if we have misunderstood the question.

    Do you need a formula to identify if a row has children?

    If so this will do the job:


    image.png

    Here it is to copy/paste

    =IF(COUNT(CHILDREN([Movment History]@row)) > 0, "parent", "not parent")

    You can combine that with your formula

    =(INDEX(CHILDREN([Movment History]@row), COUNT(CHILDREN([Movment History]@row))))

    Like this (your formula in bold):

    =IF(COUNT(CHILDREN([Movment History]@row)) > 0, (INDEX(CHILDREN([Movment History]@row), COUNT(CHILDREN([Movment History]@row)))), "not parent")

    Now, if the row is a parent it will execute your formula, and if it is not, it will put in "not parent". You can change "not parent" to "".

    image.png

    If you need something other than identifying if the row is a parent you can adjust the first part of the IF (shown in bold here) to the logic that suits.

    =IF(COUNT(CHILDREN([Movment History]@row)) > 0, (INDEX(CHILDREN([Movment History]@row), COUNT(CHILDREN([Movment History]@row)))), "")

    Hope this helps.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!