Dividing Cells & Averages

G

Guest

Two separate questions:
1- I'm dividing two cells (C2/B2) and both cells are 0. I want the answer
(even if it is zero) in cell D2 and I'm getting #DIV/0 error message. How do
I get 0 in D2?

2-Created a spreadsheet that gets updated on a weekly basis, how do I
average 4 numbers that aren't consistent (Cells are B9, B20, B31, B42), but
want to keep a running average throughout the month at the bottom of the
spreadsheet and do not want to have #DIV/0 in the cells that are at the end
of the month (which means that the numbers haven't been entered yet).
 
D

David Biddulph

Cas said:
Two separate questions:
1- I'm dividing two cells (C2/B2) and both cells are 0. I want the answer
(even if it is zero) in cell D2 and I'm getting #DIV/0 error message. How
do
I get 0 in D2?

If you really do want a zero in D2 whenever B2 is zero, then try:
=IF(B2=0,0,C2/B2)
If you are prepared to live with #DIV/0 when dividing a non-zero number by
zero, but want the answer zero when dividing zero by zero, try:
=IF(AND(B2=0,C2=0),0,C2/B2)
2-Created a spreadsheet that gets updated on a weekly basis, how do I
average 4 numbers that aren't consistent (Cells are B9, B20, B31, B42),
but
want to keep a running average throughout the month at the bottom of the
spreadsheet and do not want to have #DIV/0 in the cells that are at the
end
of the month (which means that the numbers haven't been entered yet).

=IF(AND(B9="",B20="",B31="",B42=""),"",AVERAGE(B9, B20, B31, B42))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top