#Incorrect argument due to #Divide by zero
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 (JanDec 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 (JanDec) 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
Best Answer

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")
Answers

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.

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")

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

Happy to help. 👍️
Help Article Resources
Categories
 All Categories
 14 Welcome to the Community
 10.6K Get Help
 63 Global Discussions
 68 Industry Talk
 385 Announcements
 3.5K Ideas & Feature Requests
 55 Brandfolder
 125 Just for fun
 50 Community Job Board
 464 Show & Tell
 40 Member Spotlight
 44 Power Your Process
 28 Sponsor X
 234 Events
 7.3K Forum Archives
Check out the Formula Handbook template!