Same formulas, but one returns a #DIV/0! error

G

Guest

In one cell I have the formula
=IF(ISBLANK(C16)," ",G16/C16)
which returns a 0 value in a particular cell if the numbers in the
corresponding cells are 0.

The problem is, I have the same formula copied to reflect a different row's
calculations
=IF(ISBLANK(C23)," ",G23/C23)
but see instead a #DIV/0! instead of a 0.

What am I missing?

Thank you for your time.
 
D

Dave Peterson

Maybe you can just check to see if the cell is empty or equal to 0?

=IF(C23=0,"",G23/C23)
 
J

JE McGimpsey

What am I missing?

What's in C23?

For instance if you have a space in C23 (and Tools/Options/Compatibility
- Transition formula evaluation checked) you'll get #DIV/0.
 
G

Guest

In those cases where you're seeing the #DIV/0! error, the cell in column C
probably has an 'invisible character, such as " " (a single space).

Best way to handle this is to specifically look for an error condition:
=IF(ISERR(G23/C23),"",G23/C23)
same for the other formulas as = IF(ISERR(G16/C16),"",G16/C16)
etc. etc.
 
P

Peo Sjoblom

Try this

=IF(C23=0,"",G23/C23)

If C23 is empty then it equals zero in this formula





--


Regards,


Peo Sjoblom
 
P

Peo Sjoblom

JLatham said:
In those cases where you're seeing the #DIV/0! error, the cell in column C
probably has an 'invisible character, such as " " (a single space).

Best way to handle this is to specifically look for an error condition:
=IF(ISERR(G23/C23),"",G23/C23)
same for the other formulas as = IF(ISERR(G16/C16),"",G16/C16)
etc. etc.

I beg to disagree, it is better to go to the root of the problem, ISERR
might hide errors that are beneficial to know that they exit whereas the div
error derives from dividing by zero and can be easily fixed by

C23=0


--


Regards,


Peo Sjoblom
 
G

Guest

Thank you so much for the responses. This suggestion worked...sort of.

After using the suggested formula I have a blank cell (no more errors!) but
the cell formatting is lost. So even though the cell formatting indicates
percentage with one decimal point (the cell should read 0.0%) it is blank
instead.

I'll keep trying....
 
P

Peo Sjoblom

So, whatever you put in the if formula will be returned, just change it to

=IF(C23=0,0,G23/C23)


--


Regards,


Peo Sjoblom
 

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

Similar Threads

Div / 0 5
How to hide #DIV/0! in cells waiting for input? 4
#DIV/0! error 1
When dividing by 0 can i show a result of 0 instead of #DIV/0 7
#DIV/0 error 2
Div/0 2
Zeros and #DIV/0! 5
#DIV/0! Query 2

Top