Counting Multiple Criteria

  • Thread starter Thread starter lmeg
  • Start date Start date
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
 
=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)
 
Thanks Bob, I've tired that and apparenlty I'm "missing a parenthesis--
or (. I can't work out where though - any ideas!
 
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)
 
Back
Top