Hello
I've trying to calculate the intervals for a workday, where the hours have different categories/earnings.
For instance
day;IntervalStart;IntervalEnd;Category
Mon;08;17;A
Mon;17;20;B
Mon;20;08;C
Tue;08;17;A
Tue;17;20;B
Tue;20;08;C
Wed;08;17;A
Wed;17;20;B
Wed;20;08;C
Thu;08;17;A
Thu;17;20;B
Thu;20;08;C
Fri;08;15;A
Fri;15;20;B
Fri;20;08;C
Anything not listed in the table is assumed category C
Example
Day;WorkStart;WorkEnd;LunchStart;LunchEnd
Mon;06;15;11;11:30
Fri;08;17;12;12:30
Sat;05;12;09;09:30
Result:
Day;intervalStart;IntervalEnd;Category
Mon;06;08;C
Mon;08;15;A
Fri;08;15;A
Fri;15;17;B
Sat;05;12;C
And lunchours needs to be subtracted from the interval they are in.
I've tried looks ups, different variations of tables but I keep getting the wrong answer due to friday being different, and I havent found a way of calculating the intervals yet, so I can assign a category to the different intervals across the day.
I've trying to calculate the intervals for a workday, where the hours have different categories/earnings.
For instance
day;IntervalStart;IntervalEnd;Category
Mon;08;17;A
Mon;17;20;B
Mon;20;08;C
Tue;08;17;A
Tue;17;20;B
Tue;20;08;C
Wed;08;17;A
Wed;17;20;B
Wed;20;08;C
Thu;08;17;A
Thu;17;20;B
Thu;20;08;C
Fri;08;15;A
Fri;15;20;B
Fri;20;08;C
Anything not listed in the table is assumed category C
Example
Day;WorkStart;WorkEnd;LunchStart;LunchEnd
Mon;06;15;11;11:30
Fri;08;17;12;12:30
Sat;05;12;09;09:30
Result:
Day;intervalStart;IntervalEnd;Category
Mon;06;08;C
Mon;08;15;A
Fri;08;15;A
Fri;15;17;B
Sat;05;12;C
And lunchours needs to be subtracted from the interval they are in.
I've tried looks ups, different variations of tables but I keep getting the wrong answer due to friday being different, and I havent found a way of calculating the intervals yet, so I can assign a category to the different intervals across the day.