Extract time chunks from time range

th081

Board Regular
Joined
Mar 26, 2006
Messages
98
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a start date and time in C1 e.g 01/07/2017 16:25:00 (date is in DD.mm.yyyy format ). In D1 I have an end date and time e.g 01/07/2017 22:15:00. The day is not relevant and is always the same in both cells.

I then have the day broken down into half hour chunks eg A2 has 00:00 and B2 has 00:30, then A3 has 00:30 and B3 01:00 etc. So 48 rows with a start half hour and end.

I then want in C2 and C3 etc how many minutes in the half hour are covered by the time range. So in my example it would be zero mins until 16:00 to 16:30 which would show 25 mins then the half hours would show 30 mins until 22:00 to 22:30 which would show 15 mins.

Some times the time range can be small eg 01/07/2017 15:02 to 01/07/2017 15:07 so this would just show 5 mins in the 15:00 to 15:07 slot.

I hope the above is clear if not please let me know.

Regards
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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