Hi
I have a spreadsheet which monitors the hours employees work - one of the rules is that an employee must have 12 hours rest between shifts...
I am using the below Data Validation formula in column I to highlight when an employee has less than 12 hours rest and an alert to appear
=OR(AND(I4-B4<0,"24:00"-B4+I4>=0.5),AND(I4-B4>=0,I4-B4>=0.5))
Now this works perfectly with the exception of when an employee finishes at say, 18:00hrs on a Friday, and starts at 22:00hrs on a Saturday - Excel Calculates the Rest hours as 04:00, when it should be 28:00
I've had a suggestion to use the following:
=I4+I2-B4-A2>=0.5
(I2 being the saturday date, A2 being the Friday date) - this does work but only for Cell I4, If I copy the Data
Validation down the column all cell references change - is there a way to keep the I2 and A2 in the formula without having to retype in every row?
Alternatively can anyone suggest a different solution to my problem?
I have a spreadsheet which monitors the hours employees work - one of the rules is that an employee must have 12 hours rest between shifts...
I am using the below Data Validation formula in column I to highlight when an employee has less than 12 hours rest and an alert to appear
=OR(AND(I4-B4<0,"24:00"-B4+I4>=0.5),AND(I4-B4>=0,I4-B4>=0.5))
Now this works perfectly with the exception of when an employee finishes at say, 18:00hrs on a Friday, and starts at 22:00hrs on a Saturday - Excel Calculates the Rest hours as 04:00, when it should be 28:00
I've had a suggestion to use the following:
=I4+I2-B4-A2>=0.5
(I2 being the saturday date, A2 being the Friday date) - this does work but only for Cell I4, If I copy the Data
Validation down the column all cell references change - is there a way to keep the I2 and A2 in the formula without having to retype in every row?
Alternatively can anyone suggest a different solution to my problem?