• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Count max number of overlapped time frame

Edit

New Member
Hi all,
As per title, assumed below the vehicle IN and OUT time into the carpark, how can i know the maximum no. of vehicles occupied the carpark?

13:03 14:31
13:04 14:25
13:05 19:00
13:31 14:24
13:37 15:45
14:02 15:00
14:03 15:32
14:05 14:45
14:35 15:35

Million thanks!

Edit
 
Edit

Firstly, Welcome to the Chandoo.org Forums

After the last car enters, there are 6 cars left as shown by:
=COUNT(A2:A10)-SUM(COUNTIF(B2:B10,"<="&A2:A10)) Ctrl+Shift+Enter

The max Number of Cars is 8 between 14:05 and 14:24, but I'll have to think about how to derive that
 
Hi to all!

With one formula, having IN time in A2:A10 and OUT time in B2:B10 (CSE: Ctrl + Shift + Enter)

=MAX(MMULT((ROW(INDIRECT(MIN(--TEXT(A2:B10,"hhmm"))&":"&MAX(--TEXT(A2:B10,"hhmm"))))>=TRANSPOSE(--TEXT(A2:A10,"hhmm")))*(ROW(INDIRECT(MIN(--TEXT(A2:B10,"hhmm"))&":"&MAX(--TEXT(A2:B10,"hhmm"))))<=TRANSPOSE(--TEXT(B2:B10,"hhmm"))),A2:A10^0))

Blessings!
 
Thanks experts!

It works perfectly! Thanks John!

p.s. how can someone able to come up with such complicated formulae? Genius!
 
Back
Top