Splitting activity duration by half an hour intervals

rafuk73

Banned
Joined
Aug 10, 2010
Messages
47
Hi,

Could you please help me with the following task:
have a long list of activities and their start and end time. What I need is to split the duration of each activity by half an hour intervals as my example below. The blue intervals show beginning of each interval, for example interval 08:00:00 shows half an hour after 08:00:00 and so on.

The figures in red is how I manually split the duration of each activity but would appreciate greatly if you could send me either formulas or the code which would do it automatically. Thanks a lot!

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Intervals[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Activity[/TD]
[TD]start time[/TD]
[TD]end time[/TD]
[TD]duration[/TD]
[TD]08:00:00[/TD]
[TD]08:30:00[/TD]
[TD]09:00:00[/TD]
[TD]09:30:00[/TD]
[TD]10:00:00[/TD]
[TD]10:30:00[/TD]
[TD]11:00:00[/TD]
[TD]11:30:00[/TD]
[/TR]
[TR]
[TD]Meeting[/TD]
[TD]08:24:56[/TD]
[TD]08:35:42[/TD]
[TD]00:10:10[/TD]
[TD]00:05:04[/TD]
[TD]00:05:42[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Training[/TD]
[TD]09:15:42[/TD]
[TD]09:25:58[/TD]
[TD]00:10:16[/TD]
[TD][/TD]
[TD][/TD]
[TD]00:10:16[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Calls[/TD]
[TD]08:25:58[/TD]
[TD]11:38:27[/TD]
[TD]03:12:29[/TD]
[TD]00:04:02[/TD]
[TD]00:30:00[/TD]
[TD]00:30:00[/TD]
[TD]00:30:00[/TD]
[TD]00:30:00[/TD]
[TD]00:30:00[/TD]
[TD]00:30:00[/TD]
[TD]00:08:27[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Pasting your table above into A1 try this in E3:

=IF(OR(E$2>$C3,E$2+"00:30"<$B3),"",MIN(E$2+"00:30",$C3)-MAX(E$2,$B3))
 
Upvote 0

Forum statistics

Threads
1,225,741
Messages
6,186,761
Members
453,370
Latest member
juliewar

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