Good afternoon,
I am just trying to write an if statement for a be careful warning, when an employee has LESS than 11 hours of rest between 2 days but it seems much more difficult than i thought:
The first two rows are the days and the codes of the daily programms of the employers. (71 is 7:00-15:00 and 1132 is 15:00-23:00). In this example 71 cannot be followed by 1132 because there are not 11 hours of rest. I've done this:
i've used this to add 11 hours to the "yesterday's" programm so i get what's the time allowed for the employer to come to work.
I've used this to get the time the employers comes to work
and i"ve used this just to get the difference
BUT i think the whole approach is wrong, any ideas?
I am just trying to write an if statement for a be careful warning, when an employee has LESS than 11 hours of rest between 2 days but it seems much more difficult than i thought:
The first two rows are the days and the codes of the daily programms of the employers. (71 is 7:00-15:00 and 1132 is 15:00-23:00). In this example 71 cannot be followed by 1132 because there are not 11 hours of rest. I've done this:
Excel Formula:
=IF(ISNUMBER(INDEX($G$67:$K$93;MATCH(E4;$G$67:$G$93;0);5));(INDEX($G$67:$K$93;MATCH(E4;$G$67:$G$93;0);5)+"11:00");(INDEX($G$67:$K$93;MATCH(E4;$G$67:$G$93;0);3)+"11:00"))
Excel Formula:
=INDEX($G$67:$K$93;MATCH(F4;$G$67:$G$93;0);2)
Rich (BB code):
=NUMBERVALUE(IF(AO4>AW4;24+(AW4-AO4);AO4-AW4))
BUT i think the whole approach is wrong, any ideas?