IF Question

J

Joe

Hi All,

I'm trying to set up a spreadsheet that will take numerous figures and
do equations on them automatically. When originally I set up this
spreadsheet I got #div/0 as the answer (when every cell in the
equation was blank)) for almost every cell because almost all of them
divided by Zero. To compensate I used IF statements like
"=IF(D8=0,"",(B3+B12+D3)/D8)" to eliminate the problem (leaving the
space blank). Unfortunately, I have a few equations like this
"=(H3)/(D9+F3)" where I only know how to compensate for one of the
variables, such as: "=IF(F3=0,"",(H3)/(D9+F3))". In this example if
anything is put into cell D9 and not F3 I get a misleading answer.

How can I use the IF function (or any other) to compensate for both D9
and F3 at the same time (anotherwords - if either are blank the answer
cell is blank)?

Thank you,
Joe
 
J

JE McGimpsey

One way:

=IF((D9+F3)=0,"",H3/(D9+F3))

or, equivalently

IF(D9=F3,"",H3/(D9+F3))
 
J

Joe

One way:

=IF((D9+F3)=0,"",H3/(D9+F3))

or, equivalently

IF(D9=F3,"",H3/(D9+F3))

Thank you for the reply. Unfortunately, I don't think this can be made
to work. In the first equation, if D9 has a number other than zero,
the statement is false and the equation is used. In the second
equation, if D9 has a number, then it is no longer equal to F3 and
therefore false, and the equation is used.

Joe
 

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

Returning A Minimum Figure 3
Excel formula for inventory problem 2
Supress DIV/0 2
Payment calculation 1
IF STATEMENT 19
Stripe out duplicate data 5
multiple IF calculations 6
#DIV/0! - how to get rid of it 7

Top