+ Reply to Thread
Results 1 to 6 of 6

Formula to calculate how many cars are parked at a point in time

  1. #1
    Registered User
    Join Date
    10-06-2021
    Location
    Perth, WA
    MS-Off Ver
    Microsoft Office 2016
    Posts
    2

    Formula to calculate how many cars are parked at a point in time

    Hi Everyone,

    So first post here, I'm looking for a formula that I feel like should be easy to work out but so far cannot really find a solution. Basically my place of work wants to know how many cars are parked on site at particular points in time, I've got arrival/departure times for the cars as well as hours parked on site but am really stumped with this one.

    In the example attached the first table show the data I have, the table next to it show the information that I want to calculate automatically.

    Any help would be greatly appreciated
    Attached Files Attached Files
    Last edited by NOVE9; 10-09-2021 at 08:43 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Formula to calculate how many cars are parked at a point in time

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-06-2021
    Location
    Perth, WA
    MS-Off Ver
    Microsoft Office 2016
    Posts
    2

    Re: Formula to calculate how many cars are parked at a point in time

    Thanks AliGW, I've added the attachment

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Formula to calculate how many cars are parked at a point in time

    Converted your text times to Excel time format

    E2

    =TIME(LEFT($B2,LEN($B2)-2),RIGHT($B2,2),0)

    F2

    =IF(TIME(LEFT($C2,LEN($C2)-2),RIGHT($C2,2),0)=0,TIME(23,59,0),TIME(LEFT($C2,LEN($C2)-2),RIGHT($C2,2),0))

    Cars per hour

    =SUMPRODUCT((K2>=$E$2:$E$16)*(K2<=$F$2:$F$16))

    You might consider entering 2400 as 2359 as it makes it easier to compute as Excel treats 2400 as 0

    so F2

    =TIME(LEFT($C2,LEN($C2)-2),RIGHT($C2,2),0)

    Better still, enter as Excel times initially!
    Attached Files Attached Files
    Last edited by JohnTopley; 10-09-2021 at 10:49 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: Formula to calculate how many cars are parked at a point in time

    [.... withdrawn ....]
    Last edited by curiouscat408; 10-09-2021 at 11:47 AM.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Formula to calculate how many cars are parked at a point in time

    @curiouscat408: works fine!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Need Help to Calculate the Point Based on Break Time
    By Sanjibghosh in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-03-2016, 01:28 AM
  2. [SOLVED] Duration of off street Parked Vehicles
    By keshav4075 in forum Excel General
    Replies: 5
    Last Post: 03-20-2015, 04:39 AM
  3. [SOLVED] Duration of Parked Vehicles
    By keshav4075 in forum Excel General
    Replies: 5
    Last Post: 03-17-2015, 02:05 PM
  4. Replies: 1
    Last Post: 03-13-2015, 04:04 AM
  5. Calculate how many concurrent cars in a car park
    By ciacovou in forum Excel General
    Replies: 6
    Last Post: 01-22-2015, 02:22 PM
  6. Maintenance service for cars, problem of formula : missing conditions
    By Jeoffrey3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-11-2014, 04:53 AM
  7. Replies: 4
    Last Post: 06-10-2013, 07:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1