I need help with the right "IF" or SUM IF formula

M Scrog
M Scrog ✭✭
edited 12/22/21 in Formulas and Functions

I want the formula to do a few things.

1 - Check to see if the row has CHILDREN and if it is a "Rollover PO"

I have a helper column that is "CHECKED" if it is a parent I also have a column for "Rollover PO"

2 - If both are checked THEN I want the formula to SUM the CHILDREN in column [Total PO Spend]

3 - If the column [Rollover PO] is not checked, I want the the formula to return the value in column [Invoice Amount] in the same row.

My attempts continue to return an UNPARSIBLE result. Am I asking too much or do I have the formula all wrong?

=IF(AND([Parent]@row, [Rollover PO]@row, 1), SUM([Total PO Spend]CHILDREN()),IF([Rollover PO]@row, 0, [Invoice Amount]@row))

Thanks,

Michael

Tags:

Best Answer

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓

    Hey @M Scrog

    Just a few adjustments to get the syntax right in the formula.

    =IF(AND([Parent]@row=1, [Rollover PO]@row=1), SUM(CHILDREN([Total PO Spend]@row)),IF([Rollover PO]@row= 0, [Invoice Amount]@row))

    Does this give you the expected results?

    Kelly

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!