Batting average works but returns error when cell is at “0”

I’ve put together a scorebook in Apple Numbers. I know how create the batting average, Hits/At Bats. However when there is no hits or at bats for a player, it returns “numbers can’t be divided by zero”, of course it works once there is an “At Bats”. How do I keep the warning sign from showing? Currently the formula reads (A2/A1), which returns the average, you’re just looking at that warning symbol. Anything else I try still results in an error.

Thank you

iPad Pro (1st generation)

Posted on May 19, 2024 10:29 AM

Reply
6 replies

May 19, 2024 2:29 PM in response to rlamma

Your first formula has a syntax error.

There should be no comma "," before and after the division symbol "/".

You wrote DK4,/,DJ4 but it should be DK4/DJ4.

Also DJ4 is not empty, the value is 0. You could use IF(DJ4<=0,"",DK4/DJ4)


The second formula gives you an error because every time you divide a number with 0 it will give you an error.

I would use the second formula DK4/DJ4 and include this in the IFERROR - Apple Support function.


Use: IFERROR(DK4/DJ4,"")


Regards Ralf


Batting average works but returns error when cell is at “0”

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.