Opening and closing times past midnight

Thoron6

New Member
Joined
Oct 27, 2015
Messages
27
Morning,

I have posted this before but not been to clear as I'm not sure how to attach an example spreadsheet.

I have tried to simplify the problem.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Day[/TD]
[TD]00:00[/TD]
[TD]01:00[/TD]
[TD]02:00[/TD]
[TD]03:00[/TD]
[TD]04:00[/TD]
[TD]05:00[/TD]
[TD]06:00[/TD]
[TD]07:00[/TD]
[TD]08:00[/TD]
[TD]09:00[/TD]
[TD]10:00[/TD]
[TD]11:00[/TD]
[TD]12:00[/TD]
[TD]13:00[/TD]
[TD]14:00[/TD]
[TD]15:00[/TD]
[TD]16:00[/TD]
[TD]17:00[/TD]
[TD]18:00[/TD]
[TD]19:00[/TD]
[TD]20:00[/TD]
[TD]21:00[/TD]
[TD]22:00[/TD]
[TD]23:00[/TD]
[/TR]
[TR]
[TD]Sat[/TD]
[TD]25[/TD]
[TD]22[/TD]
[TD]21[/TD]
[TD]20[/TD]
[TD]19[/TD]
[TD]18[/TD]
[TD]17[/TD]
[TD]19[/TD]
[TD]20[/TD]
[TD]12[/TD]
[TD]6[/TD]
[TD]8[/TD]
[TD]1[/TD]
[TD]8[/TD]
[TD]9[/TD]
[TD]2[/TD]
[TD]10[/TD]
[TD]17[/TD]
[TD]15[/TD]
[TD]62[/TD]
[TD]21[/TD]
[TD]12[/TD]
[TD]35[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]Sun[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]8[/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]9[/TD]
[TD]6[/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]13[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[/TR]
[T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TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 500"]
<tbody>[TR]
[TD]Sat[/TD]
[TD]08:00[/TD]
[TD]02:00[/TD]
[/TR]
[TR]
[TD]Sun[/TD]
[TD]08:00[/TD]
[TD]23:00[/TD]
[/TR]
[TR]
[TD]Mon[/TD]
[TD]07:00[/TD]
[TD]22:00[/TD]
[/TR]
[TR]
[TD]Tue[/TD]
[TD]08:00[/TD]
[TD]22:00[/TD]
[/TR]
[TR]
[TD]Wed[/TD]
[TD]09:00[/TD]
[TD]22:00[/TD]
[/TR]
[TR]
[TD]Thur[/TD]
[TD]10:00[/TD]
[TD]22:00[/TD]
[/TR]
[TR]
[TD]Fri[/TD]
[TD]10:00[/TD]
[TD]01:00[/TD]
[/TR]
</tbody>[/TABLE]


So I need to sum the totals outside of the opening hours. The main problem I am having is when the closing time is past midnight and not including the next days consumption in the relevant day calculations.

So the above example, I'd like to see

Sat = sum of numbers after 1am (due to Friday not closing until 1am) until it opens at 8am .. so 21 + 20+19+18+17+19...

As always, any help would be greatly appreciated.

Thank you
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Also.... As this would be across a portfolio, the day and opening hours are not all the same. So Sunday 08:00 - 23:00 may only be for this specific example but may change at another branch.

Thank you
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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