ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sum and Count (https://www.excelbanter.com/excel-discussion-misc-queries/104576-sum-count.html)

Brento

Sum and Count
 

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
------------------------------------------------------------------------
Brento's Profile: http://www.excelforum.com/member.php...o&userid=25213
View this thread: http://www.excelforum.com/showthread...hreadid=570886


SteveG

Sum and Count
 

Brento,

Try,

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

Format the result as h:mm.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=570886


Dave F

Sum and Count
 
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

"Brento" wrote:


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
------------------------------------------------------------------------
Brento's Profile: http://www.excelforum.com/member.php...o&userid=25213
View this thread: http://www.excelforum.com/showthread...hreadid=570886




All times are GMT +1. The time now is 02:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com