Time intervals

MaayanYogev

New Member
Joined
Feb 5, 2023
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
Time intervals
I have a database of flight arrival times and would like to group them into intervals of 45 minutes, starting from the first hour.
FLOORfunction is problematic here because it rounds down the minutes.

For example:

14:05:00 -- I need the interval to start at 14:05, but "FLOOR" starts if from 14:00
14:12:00
14:18:00
14:45:00

How can I solve this issue?

Thanks
 
That is contrary to your requirement. the 45 Minute Interval groups (starting at 2:00 PM) are:
Mr Excel Questions2.xlsm
ABC
1ArrStart of Time GroupEnd of Time Group
214:0514:0014:45
314:1214:0014:45
414:1814:0014:45
514:1814:0014:45
614:3614:0014:45
714:4514:4515:30
815:0614:4515:30
915:2614:4515:30
1016:4016:1517:00
1116:4016:1517:00
1217:1017:0017:45
1317:2017:0017:45
Sheet6
Cell Formulas
RangeFormula
B2:B13B2=((45*(INT((HOUR(A2)*60+MINUTE(A2))/45)))/(60*24))+IF(MOD((HOUR(A2)*60+MINUTE(A2)),45)>=30,1/48,-0.5/48)
C2:C13C2=B2+45/(24*60)
A10:A11A10=TIME(16,40,0)
A12A12=TIME(17,10,0)
A13A13=TIME(17,20,0)


Please explain why I am thinking differently than you?
Im working on this sheet to manage vehicle drivers to pick up people from the airport and schedule it by their flight landing time.
The role is that parties can only wait at the airport for a maximum of 45 minutes.
So- transportation pick-up time should be the minimum at a range.
If I would manually set the hours ("Transportation Time" column), it would look like this in the picture:
 

Attachments

  • WhatsApp Image 2023-02-05 at 18.20.49.jpeg
    WhatsApp Image 2023-02-05 at 18.20.49.jpeg
    158.1 KB · Views: 4
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
To put it words I may understand better.
You want to restart the 45 minute window at the point of the first arrival AFTER the prior 45 minute window has expired? Adn that restart time is the arrival time?
 
Upvote 0
How is this:

Mr Excel Questions2.xlsm
ABC
1ArrTransport Time
214:0514:05
314:1214:05
414:1814:05
514:1814:05
614:3614:05
714:4514:05
815:0615:51
915:2615:51
1016:4017:25
1116:4017:25
1217:1017:25
1317:2017:25
14
Sheet6
Cell Formulas
RangeFormula
B2B2=IF(ISNUMBER(B1)=FALSE,A2,IF(A2<=(B1+45/(60*24)),B1,A2+(45/(24*60))))
B3:B13B3=IF(A3<=(B2+45/(60*24)),B2,A3+(45/(24*60)))
A10:A11A10=TIME(16,40,0)
A12A12=TIME(17,10,0)
A13A13=TIME(17,20,0)
 
Upvote 0
To put it words I may understand better.
You want to restart the 45 minute window at the point of the first arrival AFTER the prior 45 minute window has expired? Adn that restart time is the arrival time?
Yes!
Im looking to open a new 45-minute window every time, each by the earliest arrival time of the group.
Refer to your example- B8:B9 should be 15:06, and B10:B13 should be 16:40
 
Upvote 0
Upvote 0
Solution
Upvote 0
My Pleasure. Have a great day!
Hey!
I have an issue
The formula doesn't work when the hour is after 23:59 (or maybe it's because of the date change?)
adding a picture:
*14.02 02:20 is the first cell that his transportation time is not working well



Thank you so much!!
 

Attachments

  • WhatsApp Image 2023-02-06 at 17.32.19.jpeg
    WhatsApp Image 2023-02-06 at 17.32.19.jpeg
    94.6 KB · Views: 2
Upvote 0
the problem is with ARR times 23:15 thru 24:00? if that statment is wrong, please let me know.
Your image is too dark to understand. I'll look at it.
 
Upvote 0
Well, the easy answer is to include the Date in the arrival time.

Keyboard short cut to insert Date and Time:
Step 1: Press Cntl and semi colon simultaneously.
Step 2: type a space
Step 3: Press Cntl, Shift, and semi colon simultaneously
Step 4: Press Enter.

You could use the now() function, but that changes every everytime your workbook recalculates.

A hard answer would involve some date mathmatics!
 
Upvote 0

Forum statistics

Threads
1,214,956
Messages
6,122,465
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top