Forum Discussion
CymruInThe70s
Apr 10, 2022Copper Contributor
Create a formula which checks if a shift start time falls within the period 10pm to 8am
Hello, I have a workbook which has a column that gives the start time of a duty shift. I want to create a formula for another column which checks if the start time of the duty shift falls between 10p...
HansVogelaar
Apr 10, 2022MVP
Let's say the start times are in D2 and down.
In E2 or another cell in row 2, enter the formula
=OR(E2<TIME(8,0,0),E2>=TIME(22,0,0))
or if you prefer
=IF(OR(E2<TIME(8,0,0),E2>=TIME(22,0,0)),"Yes","No")
Fill down.
- CymruInThe70sApr 10, 2022Copper ContributorThank you so much for those, I'll try them. Thank you for your quick response, it's much appreciated.
- CymruInThe70sApr 10, 2022Copper Contributor
Hmmm...those don't seem to work.
So, maybe I should describe in more detail. I have in 'Column A' a series of start times in the format '12:04:00', in rows 1-27. I need a new column to tell me if any start time falls between 22:00:00-08:00:00.
In column B (or somewhere else), I'd like to create a cell which produces a YES/NO response if the value in Column A falls between 22:00:00 and 08:00:00. - Riny_van_EekelenApr 10, 2022Platinum Contributor
CymruInThe70s As a variant:
- CymruInThe70sApr 10, 2022Copper ContributorOK, Riny, I'll try that. Thanks. 🙂