Hi,
I have the below formula that counts columns D - Q working out the hours an employee works based on the type of shift indicated by using "D", "N","DC", "B/D" "TWL". If an employee covers part shifts it is indicated as time (example 13:00 - 17:00). I've encountered a problem with the last part of the formula that counts the hours between time on a part shift (example, 13:00 -17:00 = 4hrs). If the employee starts the part shift one day and works past midnight (example, 20:00 - 02:00 it returns minus hours worked and reduces the overall hours.
Any help would be greatly appreciated.
=SUM(COUNTIF(D17:Q17, {"D","N","DC","B/D"}))*11.75+COUNTIF(D17:Q17,"TWL")*11.5+SUMPRODUCT(--IFERROR(RIGHT(D17:Q17,5)-LEFT(D17:Q17,5),0))*24
I have the below formula that counts columns D - Q working out the hours an employee works based on the type of shift indicated by using "D", "N","DC", "B/D" "TWL". If an employee covers part shifts it is indicated as time (example 13:00 - 17:00). I've encountered a problem with the last part of the formula that counts the hours between time on a part shift (example, 13:00 -17:00 = 4hrs). If the employee starts the part shift one day and works past midnight (example, 20:00 - 02:00 it returns minus hours worked and reduces the overall hours.
Any help would be greatly appreciated.
=SUM(COUNTIF(D17:Q17, {"D","N","DC","B/D"}))*11.75+COUNTIF(D17:Q17,"TWL")*11.5+SUMPRODUCT(--IFERROR(RIGHT(D17:Q17,5)-LEFT(D17:Q17,5),0))*24