# #Incorrect argument due to #Divide by zero

Options

I have been attempting to create a formula where I will not have to manually update this every month. My "OSHA Loss Time Rate" is broke down by month (Jan-Dec rows), the 7.78 formula is "=(([Lost Time Cases]@row * 200000) / [Hours Worked]@row)", however if I do not have any hours in or a 0, it shows the #DIVIDE BY ZERO, due to nothing there. I have seen numerous posts talking about the IFERROR formula, however I have no idea how to use it. Since I have the hours in for January (first line with 7.78) but none for February, I am assuming I need to add the IFERROR option included in the formula for the OSHA Loss Time Rate? If so, how would you do that formula?

The other issue is that the top grey #INCORRECT ARGUMENT is due to needing to get the average of all the months (Jan-Dec) below that line. Once again, I am assuming I need to add in the IFERROR formula due it trying to calculate the average but there is an error (#DBZ).

Thank you,

Mitchell Reynolds

• ✭✭✭✭✭✭
Options

The IFERROR wraps around the existing formula to output something different in the event the original formula throws an error.

=IFERROR(original_formula, "output if error")

=IFERROR((([Lost Time Cases]@row * 200000) / [Hours Worked]@row), "output if error")

• ✭✭✭✭✭
Options

I haven't read what you have to say, only the title and the screenshot.

In the cell with #DIVIDE BY ZERO, use an IFERROR i.e. =IFERROR([your formula here],"")

That should sort it out.

• ✭✭✭✭✭✭
Options

The IFERROR wraps around the existing formula to output something different in the event the original formula throws an error.

=IFERROR(original_formula, "output if error")

=IFERROR((([Lost Time Cases]@row * 200000) / [Hours Worked]@row), "output if error")

• Options

Thank you! Trying to read the formula information on Smartsheet just confused me even more. This was a very simple explanation for me, and it worked perfect!

Thank you,

Mitchell Reynolds

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!