# Hide Divide by Zero Error

Options
✭✭✭✭✭
edited 12/09/19

Hello,

I am having issues with creating the correct formula that calculates the average of the children rows while hiding the divide by zero errors for columns that do not have any data.

=IFERROR(AVG(CHILDREN([Column]@row],"")))

Thanks so much!

• ✭✭✭✭✭✭
Options

=IFERROR(AVG(CHILDREN([Column]@row])),"")

• Employee
Options

Hello,

Happy to help! Paul is correct adjusting the parenthesis would work, don't forget to remove the bracket. Also, the Children Function will reference all child rows within the same column, you may not need the [Column]@row part of the formula.

This is further outlined here: https://help.smartsheet.com/function/children

The formula could look like this:

=IFERROR(AVG(CHILDREN([Column]@row),""))

or

=IFERROR(AVG(CHILDREN(),""))

Cheers,

Eric

Smartsheet Support

• ✭✭✭✭✭
Options

Thanks so much!

• ✭✭✭✭✭
Options

Thank you.

• ✭✭✭✭✭✭
Options
• ✭✭
Options

I have a similar question, though I have a typical If function. The Iferror doesn't seem to replace it to fix. The formula currently for Fee Spend Percentage is:

=[Spent (Ajera)]@row / [Contract Amount]@row

applied to column. The formula currently for Under Fee is:

=IF([Project Complete (Percentage)]@row > [Fee Spent (Percentage)]@row, "Yes", "No")

applied to column. I would prefer that if I schedule a project but the contract/fee information is not input, it would not identify anything at all instead of #DIVIDE BY ZERO.

As an aside, would anyone have any idea of how to grab Ajera data instead of needing to input it manually?

I appreciate any help!

Options

Hi @Tehren

When you say that the IFERROR function doesn't help, what happens? Are you seeing the same error?

The IFERROR function for your formula would be structured as follows:

=IFERROR([Spent (Ajera)]@row / [Contract Amount]@row, 0)

Did that work?

Cheers,

Genevieve

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!