Check whether a time is in between two time (start and stop time) PM-AM or AM to PM

Occasional Visitor

Hello Everyone,

 

I'm working on one dataset for a very long time and needs help. In the data we have start and stop time. There are different shift timing. I want to check whether a time is in between two time. I've used this formula (=IF($Q$1=MEDIAN(L2,M2,$Q$1),"Yes","No")) which is working fine. However it is giving accurate results when the given time is post 12 AM. 

For example: The formula is not giving correct results when start time is 5 PM and end time is 2 AM and when I want to check whether 12:30 AM is in between 5 PM to 2 AM. 

 

Requesting to help with this.

 

Thank you.

1 Reply

Hi,
Can this help?
=IF(Q1>=L2;IF(B8<=M2;"yes";"no");"no")
Kind regards
Hans