Let's say I have the following start and end days/times:
Resulting in a range of time from Mon 10am through Tues at 11:59pm
.
I'd like to know whether this range of time overlaps another range of time on a separate sheet.
Below is an example of 2 date ranges to compare to: one that overlaps and one that doesn't:
I'd like the function in the row associated with OVERLAP?
to return either TRUE
or FALSE
depending on whether there is overlap in the given time range with the range shown for SHEET1
.
Is it possible to construct date ranges based on start/end times and then compare that range to other ranges of time to determine if there's overlap?
- Preferably all on the fly (i.e., not saving any outputs to a sheet until the final
TRUE
/FALSE
.
Sample Sheet (as comma delimited):
Start Day, Monday,
Start Time, 10:00 AM,
End Day, Tuesday,
End Time, 11:59 PM
Day of interest, Monday, Tuesday,
DOI start, 8:00 AM, 8:00 AM,
DOI end, 9:00 AM, 9:00 AM,
OVERLAP?, FALSE, TRUE
Best Answer
the spreadsheet doesn't understand the "advanced" human logic from a go like connections between events and comparing the overlap of their durations... therefore
Sheet1!B1
needs to be converted into date format corresponding to same day (in present, past or future - reference doesn't matter) with appended time fromSheet1!B2
which is then compared toSheet2!B1
with appendedSheet2!B2
etc.simply said, formula does this:
if
Monday 8:00 AM>
or=
to Monday 10:00 AMand
Monday 9:00 AM<
than Tuesday 11:59 PM statement isTRUE
otherwise itsFALSE
like in this casepaste this formula to
Sheet2!B4
and drag it over toSheet!C4
cell