Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
An easy macro question and one I believe to be a little more diffi | Excel Worksheet Functions | |||
Compare Question | Excel Discussion (Misc queries) | |||
2 part question on averaging | Excel Discussion (Misc queries) | |||
COUNTIF Question | Excel Worksheet Functions | |||
Have a question on scrolling sum with Excel. | Excel Worksheet Functions |