Use an IF statement to insert formula?

Is it possible to use an IF statement to insert the correct formula? Based on the hierarchy, I need one formula added for the parent rows but a different formula for the child rows. The individual formulas do work, but not in the IF statement. Wondering if there is a trick that I'm missing?

=IF(Hierarchy@row = 0, "=SUM(CHILDREN())", "=SUMIFS({LbrTrkCost}, {LbrTrkPrj}, Project@row, {LbrTblResource}, Resource@row, {LbrTblType}, "CapEx")")

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!