I'm trying to find out if someone was not working during 'out of hours'.
- If Monday to Friday, not between the hours of, 8am to 9pm, then the answer would be "Yes"
If it's a Saturday, not between the hours of, 8am to 5pm, the answer would be "Yes"
If it's a Sunday, not between the hours of, 9am to 5pm, the answer would be "Yes".
Otherwise the answer would be "No".
There are 4 columns: 1. Person's Name (A) 2. Date (B) 3. Time (C) 4. Out of Hours (D)
I've copied in the formula below which is working correctly for Monday to Friday, but I'm struggling with the second part of the weekend one.
=IF(OR(WEEKDAY(B2)=1,WEEKDAY(B2)=7),"Yes",IF(AND(C2>=8/24,C2<21/24),"No","Yes"))
If anyone could advise on how to change the formula to work with 'out of hours' for Saturday and Sunday?
It would be greatly appreciated.