Time distribution within a 24 hour period

HowToAsk

New Member
Joined
Aug 30, 2011
Messages
3
I need some help in distributing time.
Suppose you div a 24 hour period into 3 parts.
07 - 17
17 - 21
21 - 07

and you have a start time and a stop time
eksample: 06 - 22

How many hours of each period did you spend/visit?

Excel example:

<table border="0" cellpadding="0" cellspacing="0" width="756"><col style="width: 104pt;" width="138"> <col style="width: 137pt;" width="183"> <col style="width: 113pt;" width="150"> <col style="width: 154pt;" width="205"> <col style="width: 60pt;" width="80"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 104pt;" height="20" width="138">
</td> <td style="width: 137pt; font-size: 11pt; color: white; font-weight: 700; text-decoration: none; font-family: Calibri; border-width: medium 0.5pt 1.5pt medium; border-style: none solid solid none; border-color: -moz-use-text-color white white -moz-use-text-color; background: none repeat scroll 0% 0% rgb(79, 129, 189);" width="183">Period start</td> <td style="width: 113pt; font-size: 11pt; color: white; font-weight: 700; text-decoration: none; font-family: Calibri; border-width: medium 0.5pt 1.5pt medium; border-style: none solid solid none; border-color: -moz-use-text-color white white -moz-use-text-color; background: none repeat scroll 0% 0% rgb(79, 129, 189);" width="150">Period stop</td> <td style="width: 154pt; font-size: 11pt; color: white; font-weight: 700; text-decoration: none; font-family: Calibri; border-width: medium medium 1.5pt; border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color white; background: none repeat scroll 0% 0% rgb(79, 129, 189);" width="205">Period number</td> <td style="width: 60pt;" width="80">
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td class="xl65" style="font-size: 11pt; color: black; font-weight: 400; text-decoration: none; font-family: Calibri; border-width: medium 0.5pt 0.5pt medium; border-style: none solid solid none; border-color: -moz-use-text-color white white -moz-use-text-color; background: none repeat scroll 0% 0% rgb(184, 204, 228);" align="right">21:00</td> <td class="xl65" style="font-size: 11pt; color: black; font-weight: 400; text-decoration: none; font-family: Calibri; border-width: medium 0.5pt 0.5pt medium; border-style: none solid solid none; border-color: -moz-use-text-color white white -moz-use-text-color; background: none repeat scroll 0% 0% rgb(184, 204, 228);" align="right">07:00</td> <td style="font-size: 11pt; color: black; font-weight: 400; text-decoration: none; font-family: Calibri; border-width: medium medium 0.5pt; border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color white; background: none repeat scroll 0% 0% rgb(184, 204, 228);" align="right">1</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td class="xl65" style="font-size: 11pt; color: black; font-weight: 400; text-decoration: none; font-family: Calibri; border-width: medium 0.5pt 0.5pt medium; border-style: none solid solid none; border-color: -moz-use-text-color white white -moz-use-text-color; background: none repeat scroll 0% 0% rgb(219, 229, 241);" align="right">07:00</td> <td class="xl65" style="font-size: 11pt; color: black; font-weight: 400; text-decoration: none; font-family: Calibri; border-width: medium 0.5pt 0.5pt medium; border-style: none solid solid none; border-color: -moz-use-text-color white white -moz-use-text-color; background: none repeat scroll 0% 0% rgb(219, 229, 241);" align="right">17:00</td> <td style="font-size: 11pt; color: black; font-weight: 400; text-decoration: none; font-family: Calibri; border-width: medium medium 0.5pt; border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color white; background: none repeat scroll 0% 0% rgb(219, 229, 241);" align="right">2</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td class="xl65" style="font-size: 11pt; color: black; font-weight: 400; text-decoration: none; font-family: Calibri; border-width: medium 0.5pt medium medium; border-style: none solid none none; border-color: -moz-use-text-color white -moz-use-text-color -moz-use-text-color; background: none repeat scroll 0% 0% rgb(184, 204, 228);" align="right">17:00</td> <td class="xl65" style="font-size: 11pt; color: black; font-weight: 400; text-decoration: none; font-family: Calibri; border-width: medium 0.5pt medium medium; border-style: none solid none none; border-color: -moz-use-text-color white -moz-use-text-color -moz-use-text-color; background: none repeat scroll 0% 0% rgb(184, 204, 228);" align="right">21:00</td> <td style="font-size: 11pt; color: black; font-weight: 400; text-decoration: none; font-family: Calibri; background: none repeat scroll 0% 0% rgb(184, 204, 228);" align="right">3</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>Time of start</td> <td>Time of stop</td> <td>Within the SAME 24 hour period</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td class="xl65" align="right">07:00</td> <td class="xl65" align="right">18:00</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td class="xl66">Hours in P1</td> <td class="xl66">Hours in P2</td> <td class="xl66">Hours in P3</td> <td class="xl66">Total</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Manually</td> <td class="xl66">0</td> <td class="xl66">10</td> <td class="xl66">1</td> <td class="xl66">11</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Dynamicly</td> <td class="xl66">x</td> <td class="xl66">x</td> <td class="xl66">x</td> <td class="xl66">x</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td colspan="2" style="height: 15pt;" height="20">Should also work for nights, </td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Start time</td> <td class="xl65" align="right">07:00</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Stop time</td> <td class="xl65" align="right">06:00</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td colspan="3" style="height: 15pt;" height="20">The case with start = stop time, this is considered a 24 hour period</td> <td>
</td> <td>
</td> </tr> </tbody></table>

Thanks in advance

MS excel 2007 on win7
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi this may help I got it somewhere but not quite sure
Excel Workbook
ABCDEFGH
10:007:0017:0021:0031:0041:00
27:0017:0021:0031:0041:0048:00
3
421:0012:000001050
Sheet
 
Upvote 0
I does not work for me.
I will try a bit more, thank you for your help.


Any other ideas are also welcome :)
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

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