Excel Error when dividing by 0 as a percentage

Anno Torr 1 Reputation point
2022-09-16T10:35:25.34+00:00

I am creating a spreadsheet for others to copy and use. The formula in column D is: =B3/C3 with the answer set as a percentage. Of course, as you can’t divide by 0, it brings up the #DIVE/0! error. I have tried to wrap it in the IFERROR as such: ‘=IFERROR(B5/C5,””) but, rather than showing as 0, it shows this calculation. What would be the solution? TIA.

Windows for business Windows 365 Business
{count} votes

4 answers

Sort by: Most helpful
  1. Munir Ahamed 1 Reputation point
    2022-09-16T10:46:41.15+00:00

    Hi Annotorr,
    Please use the below formula and let me know whether it's working or not.

    =IF(IFERROR(B3/C3,"")="","0","")

    0 comments No comments

  2. Olaf Helper 47,436 Reputation points
    2022-09-16T10:56:35.07+00:00

    Use WHEN to test the cell on 0, like

    =WHEN(C5=0,0,B5/C5)  
    
    0 comments No comments

  3. Anno Torr 1 Reputation point
    2022-09-16T11:13:42.7+00:00

    Thanks so much, @Olaf Helper and @Munir Ahamed for your answers. The formula still shows up rather than the answer as 0. See image. Thanks for your time and expertise. :)
    241871-excel-capture-1.png

    0 comments No comments

  4. Anno Torr 1 Reputation point
    2022-09-16T12:17:27.13+00:00

    @Olaf Helper and @Munir Ahamed , @Viorel I have figured it out. I am in South Africa, and for some odd reason, here, we use the semi-colon instead of the comma - which causes problems with the .csv files uploaded to out-of-country platforms!! So I replaced the commas with ; and added the 0 between the "" and it works!! Thanks so much for all of your time. I so appreciate it. :)
    241855-image.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.