View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default If any 3 of 5 values are 0 then 0.

Should you be MODing the column, and summing the MOD columns in case any
others have values

=IF(OR((MOD(COLUMN(G7:O7),2)=1)*(COUNTIF(G7:O7,0) =3),O7=0),0,SUM(IF(MOD(COLUMN(G7:O7),2)=1,G7:O7)))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Teethless mama" wrote in message
...
=IF(OR((MOD(G7:O7,2)=1)*(COUNTIF(G7:O7,0)=3),O7=0 ),0,SUM(G7:O7))


"Gary" wrote:

Hi,

I can do it with IF(OR(AND formula but i will have to write all the
combinations of 3 out of these 5 values. for example...

=IF(OR(AND(O7=0,M7=0,K7=0),AND(O7=0,M7=0,G7=0)),0, "") something like
this.

Is there a smarter way of saying if any 3 of these 5 cells have 0 then
return 0 else return sum of all 5?

these 5 cells are O7, M7, K7, G7, I7.

another condition is that if O7 alone is 0 then also it should return 0.

Regards.