Intersection Temp Intervals

galileogali

Well-known Member
Joined
Oct 14, 2005
Messages
748
I have a daily interval:
22:00 to 06:00 (a)
and an interval variable, for example: 02/13/2010 09:00 TO 02/17/2010 21:30. (b)
I want Formula that returns how many hours there are in the intersection between interval (b) and the intervals (a1... a2... an)
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
try:
Excel Workbook
ABCDEFG
1startmiddleendtotal time
213/02/2010 09:0017/02/2010 21:3002:0000:0006:0008:00
Sheet


Only G2 is needed, C2:D2 just shows how the formula is made up of three separate parts which need summing. That is the number of hours in the first day, + the number of full days in the middle multiplied by 8 hours, + the number of hours on the last date.
ps. the dates may look a bit wrong because I'm in the UK which uses dd/mm/yy.
 
Upvote 0
I notice that cell G2 is showing only 8:00 hours above, either the format of that cell should be custom format:
[hh]:mm
(the square brackets are important),
or:
the formula needs to be a bit different (only add *24 at the end) and the format of the cell needs to be a number, but the result will be in decimal hours, so 10.5 hours means 10:30.
 
Upvote 0
Excel Workbook
GHIJ
1Nocturnidad
222:0006:00
3
420-Feb-11 01:0024-Feb-11 00:0031:00:00
521-Feb-11 18:0023-Feb-11 23:3017:30:00
622-Feb-11 19:0023-Feb-11 14:3008:00:00
723-Feb-11 20:0027-Feb-11 01:0027:00:00
Desplazamientos


This was to make some adjustments

Thanks, again
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,176
Members
452,893
Latest member
denay

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