PaulF
Active Member
Hello ALL!
I have a challenge that is straining my brain
I have a work release form. Drop work to select a skill craft, start date, end date, resource count, hours per day, days per week, regular time rate, and over time rate.
Days per week: 4 = Mon - Thu | 5 = Mon - Fri | 6 = Mon - Sat | 7 = Mon - Sun
Weeks can start and end on any day.
The challenge is a 6 dimension puzzle in my brain and I hope I am just over thinking this.
I have been able to get the hours (without figuring out REG/OT) with this formula:
=IF(L26=4,INT((WEEKDAY(G26-2)-G26+I26)/7)+INT((WEEKDAY(G26-3)-G26+I26)/7)+INT((WEEKDAY(G26-4)-G26+I26)/7)+INT((WEEKDAY(G26-5)-G26+I26)/7),IF(L26=5,INT((WEEKDAY(G26-2)-G26+I26)/7)+INT((WEEKDAY(G26-3)-G26+I26)/7)+INT((WEEKDAY(G26-4)-G26+I26)/7)+INT((WEEKDAY(G26-5)-G26+I26)/7)+INT((WEEKDAY(G26-6)-G26+I26)/7),IF(L26=6,INT((WEEKDAY(G26-2)-G26+I26)/7)+INT((WEEKDAY(G26-3)-G26+I26)/7)+INT((WEEKDAY(G26-4)-G26+I26)/7)+INT((WEEKDAY(G26-5)-G26+I26)/7)+INT((WEEKDAY(G26-6)-G26+I26)/7)+INT((WEEKDAY(G26-7)-G26+I26)/7),IF(L26=7,INT((WEEKDAY(G26-2)-G26+I26)/7)+INT((WEEKDAY(G26-3)-G26+I26)/7)+INT((WEEKDAY(G26-4)-G26+I26)/7)+INT((WEEKDAY(G26-5)-G26+I26)/7)+INT((WEEKDAY(G26-6)-G26+I26)/7)+INT((WEEKDAY(G26-7)-G26+I26)/7)+INT((WEEKDAY(G26-8)-G26+I26)/7)))))
I am assuming I can shorten this *crossfingers*
It is essential 1 formula running checking the number of days selected and then summing the number if matching days in the start / end dates.
Is there a way to shorten this and then how to I calculate for Reg vs. OT hours. Yes I can use helper columns. OT always starts after 40, but calculating that for beginning and ending week is giving me the challenge in my brain.
Thank you in advance for any assistance.
Respectfully,
Paul F
I have a challenge that is straining my brain
I have a work release form. Drop work to select a skill craft, start date, end date, resource count, hours per day, days per week, regular time rate, and over time rate.
Days per week: 4 = Mon - Thu | 5 = Mon - Fri | 6 = Mon - Sat | 7 = Mon - Sun
Weeks can start and end on any day.
The challenge is a 6 dimension puzzle in my brain and I hope I am just over thinking this.
I have been able to get the hours (without figuring out REG/OT) with this formula:
=IF(L26=4,INT((WEEKDAY(G26-2)-G26+I26)/7)+INT((WEEKDAY(G26-3)-G26+I26)/7)+INT((WEEKDAY(G26-4)-G26+I26)/7)+INT((WEEKDAY(G26-5)-G26+I26)/7),IF(L26=5,INT((WEEKDAY(G26-2)-G26+I26)/7)+INT((WEEKDAY(G26-3)-G26+I26)/7)+INT((WEEKDAY(G26-4)-G26+I26)/7)+INT((WEEKDAY(G26-5)-G26+I26)/7)+INT((WEEKDAY(G26-6)-G26+I26)/7),IF(L26=6,INT((WEEKDAY(G26-2)-G26+I26)/7)+INT((WEEKDAY(G26-3)-G26+I26)/7)+INT((WEEKDAY(G26-4)-G26+I26)/7)+INT((WEEKDAY(G26-5)-G26+I26)/7)+INT((WEEKDAY(G26-6)-G26+I26)/7)+INT((WEEKDAY(G26-7)-G26+I26)/7),IF(L26=7,INT((WEEKDAY(G26-2)-G26+I26)/7)+INT((WEEKDAY(G26-3)-G26+I26)/7)+INT((WEEKDAY(G26-4)-G26+I26)/7)+INT((WEEKDAY(G26-5)-G26+I26)/7)+INT((WEEKDAY(G26-6)-G26+I26)/7)+INT((WEEKDAY(G26-7)-G26+I26)/7)+INT((WEEKDAY(G26-8)-G26+I26)/7)))))
I am assuming I can shorten this *crossfingers*
It is essential 1 formula running checking the number of days selected and then summing the number if matching days in the start / end dates.
Is there a way to shorten this and then how to I calculate for Reg vs. OT hours. Yes I can use helper columns. OT always starts after 40, but calculating that for beginning and ending week is giving me the challenge in my brain.
Thank you in advance for any assistance.
Respectfully,
Paul F