excel formula


Posted by cait on February 09, 2002 11:09 PM

How can i get the following formula to work: =IF(F2=0,"n/a",SUM(D2:E2/F2))

what I am trying to do is automate the following to put n/a in if there is a zero in column f or otherwise work out a percentage:
d e f g
0 0 0 n/a
83 261 659 #VALUE!
3 11 0 n/a
0 2 14 #VALUE!
20 0 274 #VALUE!
73 312 498 #VALUE!
20 197 283 #VALUE!
0 3 0 n/a

Posted by Rod on February 10, 2002 12:36 AM

=IF(F2=0,"n/a",SUM(D2:E2)/F2) eom



Posted by Yogi Anand on February 10, 2002 1:35 PM

Re: =IF(F2=0,"n/a",SUM(D2:E2)/F2) eom

Hi Cait:
As pointed out in Rod's response to your posting, even though your formula syntax is right, chances are you have a logic error in your formula.
Additionally ...
If some of the values in Col F are not available mark them as #N/A instead of 0(zero), and then you can simply use the formula
=sum(D2:E2)/F2
It will automatically result in #N/A where values in Col F were marked #N/A
HTH

Yogi Anand
ANAND Enterprises