Counting Multiple Criteria

L

lmeg

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 an
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 lorrie
arrive
Between 08:00 - 08:59: 2, 7.5t lorries arrive and 2, 17t lorrie
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
 
B

Bob Phillips

=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)
 
L

lmeg

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

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top