Answers

Question and Answer:

  Home  MS Excel

⟩ I am trying to get the percentage of two cells by dividing one cell into the other. Some of the time both cells might have a Zero in each. Therefore the DIV?

This seems like an incredible pain, but I have to use it all of the time.

If your spreadsheet is set up with the numerand in column A, the divisor in B, and in C you are trying to calculate A/B, then you would enter this formula in cell C2:

=IF(B2=0,"NA",A2/B2)

At my job, we use NA to indicate that a number divided by 0 is not applicable. If, as you say, you want a zero there, then you would use this formula:

=IF(B2=0,0,A2/B2)

 222 views

More Questions for you: