Share via

How do I get 0% with =0/0 equation?

Anonymous
2011-05-24T02:19:52+00:00

I'm making a spread sheet with excel and I'm trying to display stats in a percentage. In a cell I'm trying to get 0.0 or 0% with the =0/0 equation. I need to have the =0/0 equation because I'm printing it with and with the equation...(ctrl~).

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
  1. Anonymous
    2011-05-24T02:38:54+00:00

    What is the actual equation in the worksheet?

    You're always going to get a #DIV/0! error when you try to divide by zero.  But you can test for the situation and set up to 'recover' from it and output anything you like.  So if your worksheet formula is actually something like:

    =A5/B5 and B5 is 0 then you get the error, but if you rewrite it as:

    =IF(ISERR(A5/B5),0,A5/B5)

    it will display 0 when the error takes place and assuming the cell is formatted as a %, then it would show as 0.0%.

    The above will work in any version of Excel.  You can trim it down in Excel 2007/2010 this way:

    =IFERROR(A5/B5,0)

    Does the same thing: if A5/B5 results in an error, 0 is displayed otherwise the result of A5/B5 is displayed.

    5 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-06-01T19:53:24+00:00

    A slightly similar formula would be =IF(B5=0,0,A5/B5)

    0 comments No comments
  2. Anonymous
    2011-06-01T14:14:51+00:00

    This is absolutely awesome! I have struggled with this for quite awhile and usually left balnk spaces in reports to eliminate the error message. Thanks!

    0 comments No comments