Sum and Count

  • Thread starter Thread starter Brento
  • Start date Start date
B

Brento

HI,

I am trying to write a formula to read various columns and count up the
total time.

Data below please align in rows and columns
A B C D ---------What i need the formular to read is, if
(a1:a5=0,and if b1:b5=0
1 1 1 0:20 ----------then total c1:c5) the answer should be 0:40
2 0 1 0:20
3 0 0 0:20
4 1 1 0:20
5 0 0 0:20

Thanks
Brento
 
Brento,

Try,

=SUMPRODUCT((A1:A5=0)*(B1:B5=0)*(C1:C5))

Format the result as h:mm.

HTH

Steve
 
if(and(count(a1:a5)=0,count(b1:b5)=0,sum(c1:c5),"")

(Note the "" is the ELSE clause of the IF statement, since you didn't
specify an ELSE requirement....)

This is also assuming that by a1:a5=0 you mean its count, and not its sum,
is 0. If it's sum you're referring to then replace count with sum in the
formula above.

Dave
 
Back
Top