# Formula to calculate/split out hours in range

#### MrMaker

##### New Member
Morning,

I need a little bit of help please.

Simply, I have a start date/time and an end time/date, and I need to split out the total number of hours (or decimal days) in the range so that they are apportioned to each day that they fall in:

Data:

A2) arrived date/time 01/02/2018 09:00

B2) end date/time 03/02/2018 15:30

Output Requirements:

C2 ) how many hours in the above were on 01/02/18 (i.e. between 01/02/2018 09:00 and 01/02/2018 23:59)

D2) how many hours in the above were on 02/02/18 (i.e. between 02/02/2018 00:00 and 02/02/2018 23:59)

E2) how many hours in the above were on 03/02/18 (i.e. between 03/02/2018 00:00 and 03/02/2018 15:30)

Hopefully this makes sense and thank you in advance

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Try:

#### MrMaker

##### New Member
Lovely stuff, thanks very much!

Replies
4
Views
498
Replies
10
Views
130
Replies
1
Views
286
Replies
20
Views
423
Replies
3
Views
148

1,136,341
Messages
5,675,203
Members
419,553
Latest member
hanahass

### 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?

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