#1   Report Post  
Joe
 
Posts: n/a
Default IF Question

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
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

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

or, equivalently

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

In article ,
Joe wrote:

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

  #3   Report Post  
Joe
 
Posts: n/a
Default

On Mon, 14 Feb 2005 16:26:02 -0700, JE McGimpsey
wrote:

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

In article ,
Joe wrote:

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


  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Correction:

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

In article ,
JE McGimpsey wrote:

or, equivalently

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
An easy macro question and one I believe to be a little more diffi TroutKing Excel Worksheet Functions 3 January 18th 05 09:17 PM
Compare Question nick Excel Discussion (Misc queries) 3 January 4th 05 10:25 AM
2 part question on averaging Geo Excel Discussion (Misc queries) 4 January 2nd 05 10:35 PM
COUNTIF Question zbert Excel Worksheet Functions 1 November 1st 04 01:59 AM
Have a question on scrolling sum with Excel. A question on scrolling sum Excel Worksheet Functions 1 October 31st 04 06:01 PM


All times are GMT +1. The time now is 09:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"