ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Count using 2 conditions, one of which being a "less than or equal to" - URGENT (https://www.excelbanter.com/excel-discussion-misc-queries/71727-count-using-2-conditions-one-being-less-than-equal-urgent.html)

SamGB

Count using 2 conditions, one of which being a "less than or equal to" - URGENT
 

I need a formula or a macro which will count using two conditions a
range of cells. The problem i have one of the conditions is a "less
than or equal to" a time.

the formula below i have used but it gives a false count, either 0 or
counts only one of the conditions

=SUMPRODUCT((A1:A25="<=00:03")*(B1:B25="AM"))

i have also used the 'Ctrl-shift-enter' aswel.

any ideas??


--
SamGB
------------------------------------------------------------------------
SamGB's Profile: http://www.excelforum.com/member.php...o&userid=31263
View this thread: http://www.excelforum.com/showthread...hreadid=512601


Bob Phillips

Count using 2 conditions, one of which being a "less than or equal to" - URGENT
 
=SUMPRODUCT(--(A1:A25<=--"00:03"),--(B1:B25="AM"))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"SamGB" wrote in
message ...

I need a formula or a macro which will count using two conditions a
range of cells. The problem i have one of the conditions is a "less
than or equal to" a time.

the formula below i have used but it gives a false count, either 0 or
counts only one of the conditions

=SUMPRODUCT((A1:A25="<=00:03")*(B1:B25="AM"))

i have also used the 'Ctrl-shift-enter' aswel.

any ideas??


--
SamGB
------------------------------------------------------------------------
SamGB's Profile:

http://www.excelforum.com/member.php...o&userid=31263
View this thread: http://www.excelforum.com/showthread...hreadid=512601




SamGB

Count using 2 conditions, one of which being a "less than or equal to" - URGENT
 

Excellent! works like a treat :)

Many Thanks
Sam


--
SamGB
------------------------------------------------------------------------
SamGB's Profile: http://www.excelforum.com/member.php...o&userid=31263
View this thread: http://www.excelforum.com/showthread...hreadid=512601



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

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