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?

Submitted by: Administrator
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)
Submitted by: Administrator

Read Online Microsoft Excel Job Interview Questions And Answers