Realjoshtodd
New Member
- Joined
- Sep 26, 2017
- Messages
- 34
I'm needing help with as time range IF statement I'm working on.
I have in Row 1 (starting in Column D) time listed out in 15 minute breaks starting at 6 am. It is in military time currently. (06:00, 06:15, 06:30, 06:45, 07:00.... 23:45, 00:00, 00:15....)
In Column B2 I have the start time of an event (06:00)
In Column C2 I have the end time of an event (16:00)
I want each block in that row to say "Yes" if the time in Row 1 inside the event time. I want it to be "" if its not inside the event time.
I have tested out a couple different formulas but keeping running into a problem when the event time runs from lets say 21:00 to 06:00. Because of the change over in time it doesn't formulate correctly.
Here are the ones I've tried.
=IF(AND(D1>$B2,D1<$C2),"Yes","No")
=IF(AND(D1>=MIN($B$2:$C$2),D1<=MAX($B$2:$C$2)),"YES","")
=IF(AND($C3>D1,$B3<D1),"Yes","NO")
Some work for times before 00:00 (midnight) but none for all of the times.
Any help would be great.
I have in Row 1 (starting in Column D) time listed out in 15 minute breaks starting at 6 am. It is in military time currently. (06:00, 06:15, 06:30, 06:45, 07:00.... 23:45, 00:00, 00:15....)
In Column B2 I have the start time of an event (06:00)
In Column C2 I have the end time of an event (16:00)
I want each block in that row to say "Yes" if the time in Row 1 inside the event time. I want it to be "" if its not inside the event time.
I have tested out a couple different formulas but keeping running into a problem when the event time runs from lets say 21:00 to 06:00. Because of the change over in time it doesn't formulate correctly.
Here are the ones I've tried.
=IF(AND(D1>$B2,D1<$C2),"Yes","No")
=IF(AND(D1>=MIN($B$2:$C$2),D1<=MAX($B$2:$C$2)),"YES","")
=IF(AND($C3>D1,$B3<D1),"Yes","NO")
Some work for times before 00:00 (midnight) but none for all of the times.
Any help would be great.