Hi, i'm trying to create an if function when employees are getting to and from work.
Basically i have four cells in the same row, first is when shifts starts, second is when employee has clocked in, third is when shift ends, and fourth is when employee has clocked out.
When employees clock in before 8 AM or at most 20 min after 8 AM (lets say 8:16 AM) the fifth cell should write "OK", and when employee clock in at 8:21 AM or later it should be "NOT OK" in the fifth cell.
Almost the same thing is for clocking out, if someone clock out at, lets say 5 PM, or at most 20 min earlier (4:46PM) it should write "OK", but if someone clock out at 4:39PM it should write "NOT OK". If clock in or clock out (or both) cells are empty it should be "NOT OK".
Third (or it's maybe fourth) condition should be, if all four cells are empty, to write "NO SHIFT"
So first two conditions are most important, rest would be good, but not important as the first two.
I have tried something like this, but it returns with too many arguments. I have tried for first two conditions only.
=IF(AND(C6<B6+TIME(0,20,0)),"OK","NOT OK", IF(AND( E6<D6-TIME(0,20,0)),"OK","NOT OK"))
B6 - Shift start
C6 - Clock in time
D6 - Shift ends
E6 - Clock out time
Thanks in advance.
Bookmarks