OK so I think I'm making this more complicated than it should be...
I have a list of data like the below (Table 2) and a separate table with the code opening and closing times which vary by day of the week (Table 1).
I'm looking to get a list of unique codes with the totals falling between the opening and closing times and a separate column for data that falls outside the opening and closing times each day. Eg.
Code | Total between times/day | Total outside of opening times.
123 xxx xxx
456 xxx xxx
Any help with the formula would be greatly appreciated.
Thanks
Table 1
[TABLE="width: 500"]
<tbody>[TR]
[TD]Code
[/TD]
[TD]Mon
[/TD]
[TD]Tue
[/TD]
[TD]Wed
[/TD]
[TD]Thur
[/TD]
[TD]Fri
[/TD]
[TD]Sat
[/TD]
[TD]Sun
[/TD]
[TD]Mon
[/TD]
[TD]Tue
[/TD]
[TD]Wed
[/TD]
[TD]Thur
[/TD]
[TD]Fri
[/TD]
[TD]Sat
[/TD]
[TD]Sun
[/TD]
[/TR]
[TR]
[TD]123
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]09:00
[/TD]
[TD]16:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]23:00
[/TD]
[TD]23:30
[/TD]
[TD]22:00
[/TD]
[/TR]
[TR]
[TD]456
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]09:00
[/TD]
[TD]11:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]23:00
[/TD]
[TD]23:30
[/TD]
[TD]22:00
[/TD]
[/TR]
[TR]
[TD]789
[/TD]
[TD]11:00
[/TD]
[TD]11:00
[/TD]
[TD]11:00
[/TD]
[TD]11:00
[/TD]
[TD]11:00
[/TD]
[TD]09:00
[/TD]
[TD]12:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22: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
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]6
[/TD]
[TD]5
[/TD]
[TD]8
[/TD]
[TD]10
[/TD]
[TD]20
[/TD]
[TD]8
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]789
[/TD]
[TD]Mon
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]4
[/TD]
[TD]5
[/TD]
[TD]5
[/TD]
[TD]10
[/TD]
[TD]31
[/TD]
[TD]20
[/TD]
[TD]6
[/TD]
[/TR]
[TR]
[TD]789
[/TD]
[TD]Tue
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]5
[/TD]
[TD]2
[/TD]
[TD]5
[/TD]
[TD]18
[/TD]
[TD]12
[/TD]
[TD]4
[/TD]
[TD]6
[/TD]
[/TR]
[TR]
[TD]789
[/TD]
[TD]Wed
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]6
[/TD]
[TD]5
[/TD]
[TD]4
[/TD]
[TD]10
[/TD]
[TD]21
[/TD]
[TD]4
[/TD]
[TD]6
[/TD]
[/TR]
</tbody>[/TABLE]
I have a list of data like the below (Table 2) and a separate table with the code opening and closing times which vary by day of the week (Table 1).
I'm looking to get a list of unique codes with the totals falling between the opening and closing times and a separate column for data that falls outside the opening and closing times each day. Eg.
Code | Total between times/day | Total outside of opening times.
123 xxx xxx
456 xxx xxx
Any help with the formula would be greatly appreciated.
Thanks
Table 1
[TABLE="width: 500"]
<tbody>[TR]
[TD]Code
[/TD]
[TD]Mon
[/TD]
[TD]Tue
[/TD]
[TD]Wed
[/TD]
[TD]Thur
[/TD]
[TD]Fri
[/TD]
[TD]Sat
[/TD]
[TD]Sun
[/TD]
[TD]Mon
[/TD]
[TD]Tue
[/TD]
[TD]Wed
[/TD]
[TD]Thur
[/TD]
[TD]Fri
[/TD]
[TD]Sat
[/TD]
[TD]Sun
[/TD]
[/TR]
[TR]
[TD]123
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]09:00
[/TD]
[TD]16:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]23:00
[/TD]
[TD]23:30
[/TD]
[TD]22:00
[/TD]
[/TR]
[TR]
[TD]456
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]10:00
[/TD]
[TD]09:00
[/TD]
[TD]11:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]23:00
[/TD]
[TD]23:30
[/TD]
[TD]22:00
[/TD]
[/TR]
[TR]
[TD]789
[/TD]
[TD]11:00
[/TD]
[TD]11:00
[/TD]
[TD]11:00
[/TD]
[TD]11:00
[/TD]
[TD]11:00
[/TD]
[TD]09:00
[/TD]
[TD]12:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]22:00
[/TD]
[TD]23:00
[/TD]
[TD]23:30
[/TD]
[TD]22:00
[/TD]
[/TR]
</tbody>[/TABLE]
Table 2
[TABLE="width: 500"]
<tbody>[TR]
[TD]Code
[/TD]
[TD]Day
[/TD]
[TD]00:30
[/TD]
[TD]01:00
[/TD]
[TD]01:30
[/TD]
[TD]02:00
[/TD]
[TD]02:30
[/TD]
[TD]03:00
[/TD]
[TD]03:30
[/TD]
[TD]04:00
[/TD]
[TD]04:30
[/TD]
[/TR]
[TR]
[TD]123
[/TD]
[TD]Mon
[/TD]
[TD]2.6
[/TD]
[TD]2.6
[/TD]
[TD]2.8
[/TD]
[TD]1.8
[/TD]
[TD]1.7
[/TD]
[TD]2.0
[/TD]
[TD]3.1
[/TD]
[TD]4.2
[/TD]
[TD]1.7
[/TD]
[/TR]
[TR]
[TD]123
[/TD]
[TD]Tue
[/TD]
[TD]2.3
[/TD]
[TD]3
[/TD]
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