Forum Discussion

AaronL89's avatar
AaronL89
Copper Contributor
Sep 21, 2021

Checking if a time range falls between another time range

Good morning,   I'm looking for a formula to help me check if a time range falls between another time range, please see example table below:   A B C D E F G Date Time From Time To ...
  • mtarler's avatar
    mtarler
    Sep 22, 2021

    AaronL89  I'll throw an option in.  Sorry it isn't 'pretty'. Also it uses LET() so if you don't have Excel 365 I will have to modify it for the older formulas:

     

    =LET(a,B1,b,C1,c,E1,d,F1,bb,b+(b<a),dd,d+(d<c),AND(c<bb,dd>a))

     

    EDIT:

    actually the conversion is pretty simple:

    =AND(E1<(C1+(C1<B1)),(F1+(F1<E1))>B1)

     

Resources