ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting Multiple Criteria (https://www.excelbanter.com/excel-worksheet-functions/96614-counting-multiple-criteria.html)

lmeg

Counting Multiple Criteria
 

I have a spreadsheet showing:

Vehicle arrival times - 07:05. 09:01, 10:00 etc
Vehicle departure times = 08:06, 18:32 etc
Type of vehicle - 7.5t, 17t. 40t etc

I want to create a sum which calculates how many arrivals and
departures there are in a given time period according to vehicle type

e.g.

Between 07:00 - 07:59: 6, 7.5t lorries arrive and 12, 17t lorries
arrive
Between 08:00 - 08:59: 2, 7.5t lorries arrive and 2, 17t lorries
arrive

I've tried a sumproduct function but can't seem to get it quite right.
Is this the correct function to use or is there some other way?


--
lmeg
------------------------------------------------------------------------
lmeg's Profile: http://www.excelforum.com/member.php...o&userid=35857
View this thread: http://www.excelforum.com/showthread...hreadid=556487


Bob Phillips

Counting Multiple Criteria
 
=SUMPRODUCT(--(rng_type="&.5t),--(rng_arrivals=time(7,0,0),--(rng_arrivals<
time(8,0,0))

etc.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"lmeg" wrote in message
...

I have a spreadsheet showing:

Vehicle arrival times - 07:05. 09:01, 10:00 etc
Vehicle departure times = 08:06, 18:32 etc
Type of vehicle - 7.5t, 17t. 40t etc

I want to create a sum which calculates how many arrivals and
departures there are in a given time period according to vehicle type

e.g.

Between 07:00 - 07:59: 6, 7.5t lorries arrive and 12, 17t lorries
arrive
Between 08:00 - 08:59: 2, 7.5t lorries arrive and 2, 17t lorries
arrive

I've tried a sumproduct function but can't seem to get it quite right.
Is this the correct function to use or is there some other way?


--
lmeg
------------------------------------------------------------------------
lmeg's Profile:

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




lmeg

Counting Multiple Criteria
 

Thanks Bob, I've tired that and apparenlty I'm "missing a parenthesis--)
or (. I can't work out where though - any ideas!?


--
lmeg
------------------------------------------------------------------------
lmeg's Profile: http://www.excelforum.com/member.php...o&userid=35857
View this thread: http://www.excelforum.com/showthread...hreadid=556487


Bob Phillips

Counting Multiple Criteria
 
More than 1 :-(

=SUMPRODUCT(--(rng_type="7.5t"),--(rng_arrivals=TIME(7,0,0)),
--(rng_arrivals<TIME(8,0,0)))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"lmeg" wrote in message
...

Thanks Bob, I've tired that and apparenlty I'm "missing a parenthesis--)
or (. I can't work out where though - any ideas!?


--
lmeg
------------------------------------------------------------------------
lmeg's Profile:

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





All times are GMT +1. The time now is 09:08 PM.

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