PDA

View Full Version : [SOLVED] Need help with a Formula



Tinku
04-05-2005, 08:50 AM
Hi I am having probs with a formula..:banghead:


=IF(D12=0,0,ROUNDDOWN(+E12/E7,2)) works fine

I want to add one more condition


=IF(D12=0 OR D7=0,0,ROUNDDOWN(+E12/E7,2)) doesnt work

it throws up an error when I add OR D7=0...

Any idea on how i can incorporate both conditions.

Regards
Tinku

sandam
04-05-2005, 08:53 AM
Maybe try this??


IF(Or(D12=0,D7=0),0,ROUNDDOWN(+E12/E7,2))

Jacob Hilderbrand
04-05-2005, 08:59 AM
Alternately you can multiply the cells to see if they are zero (which would indicate at least one of them is zero).


If(D12*D7=0,0,ROUNDDOWN(E12/E7,2))

And we can eliminate the =0 part.


If(D12*D7,ROUNDDOWN(E12/E7,2),0)

Tinku
04-05-2005, 09:07 AM
Sweeeeeeeet... Thanks Sandam and DRJ..
I am using Sandam's formula and it works like a charm..

DRJ I will give ur formula a shot..but having a hard time figuring out how
the 2nd one works..

If(D12*D7,ROUNDDOWN(E12/E7,2),0)


Regards
Tinku

Jacob Hilderbrand
04-05-2005, 09:13 AM
0 = False

So if D12*D7 is equal to 0 the If formula will evaluate the False portion otherwise it will evaluate the True portion.

When you use D12*D7=0 that will be evaluated to True or False. But in this case if D12*D7 is equal to 0 it will be evaluated to True.

Hopefully that makes sense.

Also, any of these formulas will work just fine, so use the one that you understand the best. I just wanted to point out some variations.