I need to create a formula influenced by arrival and departure times. Each individual will come and go at their allotted times. We are working within windows of time. For example, people coming between 8 a.m. and noon and departing between 11 a.m. and 3 p.m. will be on a specific schedule. There are 3 potential windows for arrivals and departures, so 9 potential schedules. The matrix is below. My end game is to populate what schedule an individual is on based on their arrival and departure being between specific ranges. The function will translate to better than 300 individuals so you can imagine we do not want to have to manually figure out which schedule for each person.
I've fiddled with IF's and can get it to work for a single line of the below matrix, and could probably nest all of it, but it would be ugly. I feel like INDEX/MATCH should be a good option, but cannot figure out how to make the "matches" work because of the time ranges. I'm stumped and would very much appreciate some help.
Below this table are the attendees actual arrival and departure times...
[TABLE="class: grid, width: 473"]
<tbody>[TR]
[TD]Earliest Arrival[/TD]
[TD]Latest Arrival[/TD]
[TD]Earliest Departure[/TD]
[TD]Latest Departure[/TD]
[TD]Schedule[/TD]
[/TR]
[TR]
[TD]8:00 AM[/TD]
[TD]12:00 PM[/TD]
[TD]11:00 AM[/TD]
[TD]3:00 PM[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]12:01 PM[/TD]
[TD]4:00 PM[/TD]
[TD]11:00 AM[/TD]
[TD]3:00 PM[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]4:01 PM[/TD]
[TD]10:00 PM[/TD]
[TD]11:00 AM[/TD]
[TD]3:00 PM[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]8:00 AM[/TD]
[TD]12:00 PM[/TD]
[TD]3:01 PM[/TD]
[TD]6:00 PM[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]12:01 PM[/TD]
[TD]4:00 PM[/TD]
[TD]3:01 PM[/TD]
[TD]6:00 PM[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]4:01 PM[/TD]
[TD]10:00 PM[/TD]
[TD]3:01 PM[/TD]
[TD]6:00 PM[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]8:00 AM[/TD]
[TD]12:00 PM[/TD]
[TD]6:01 PM[/TD]
[TD]9:00 PM[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]12:01 PM[/TD]
[TD]4:00 PM[/TD]
[TD]6:01 PM[/TD]
[TD]9:00 PM[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]4:01 PM[/TD]
[TD]10:00 PM[/TD]
[TD]6:01 PM[/TD]
[TD]9:00 PM[/TD]
[TD]I[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 210"]
<colgroup><col width="121" style="width:91pt"> <col width="89" style="width:67pt"> </colgroup><tbody>[TR]
[TD="width: 121"]Flight Arrival Time[/TD]
[TD="width: 89"]Flight Departure Time[/TD]
[/TR]
[TR]
[TD="align: right"]8:30 AM[/TD]
[TD="align: right"]11:10 AM[/TD]
[/TR]
[TR]
[TD="align: right"]12:05 PM[/TD]
[TD="align: right"]11:10 AM[/TD]
[/TR]
[TR]
[TD="align: right"]4:15 PM[/TD]
[TD="align: right"]11:10 AM[/TD]
[/TR]
[TR]
[TD="align: right"]8:30 AM[/TD]
[TD="align: right"]3:45 PM[/TD]
[/TR]
[TR]
[TD="align: right"]12:05 PM[/TD]
[TD="align: right"]3:45 PM[/TD]
[/TR]
[TR]
[TD="align: right"]4:15 PM[/TD]
[TD="align: right"]3:45 PM[/TD]
[/TR]
[TR]
[TD="align: right"]8:30 AM[/TD]
[TD="align: right"]7:30 PM[/TD]
[/TR]
[TR]
[TD="align: right"]12:05 PM[/TD]
[TD="align: right"]7:30 PM[/TD]
[/TR]
[TR]
[TD="align: right"]4:15 PM[/TD]
[TD="align: right"]7:30 PM[/TD]
[/TR]
[TR]
[TD="align: right"]8:30 AM[/TD]
[TD="align: right"]11:10 AM[/TD]
[/TR]
[TR]
[TD="align: right"]12:05 PM[/TD]
[TD="align: right"]11:10 AM[/TD]
[/TR]
</tbody>[/TABLE]
I've fiddled with IF's and can get it to work for a single line of the below matrix, and could probably nest all of it, but it would be ugly. I feel like INDEX/MATCH should be a good option, but cannot figure out how to make the "matches" work because of the time ranges. I'm stumped and would very much appreciate some help.
Below this table are the attendees actual arrival and departure times...
[TABLE="class: grid, width: 473"]
<tbody>[TR]
[TD]Earliest Arrival[/TD]
[TD]Latest Arrival[/TD]
[TD]Earliest Departure[/TD]
[TD]Latest Departure[/TD]
[TD]Schedule[/TD]
[/TR]
[TR]
[TD]8:00 AM[/TD]
[TD]12:00 PM[/TD]
[TD]11:00 AM[/TD]
[TD]3:00 PM[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]12:01 PM[/TD]
[TD]4:00 PM[/TD]
[TD]11:00 AM[/TD]
[TD]3:00 PM[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]4:01 PM[/TD]
[TD]10:00 PM[/TD]
[TD]11:00 AM[/TD]
[TD]3:00 PM[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]8:00 AM[/TD]
[TD]12:00 PM[/TD]
[TD]3:01 PM[/TD]
[TD]6:00 PM[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]12:01 PM[/TD]
[TD]4:00 PM[/TD]
[TD]3:01 PM[/TD]
[TD]6:00 PM[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]4:01 PM[/TD]
[TD]10:00 PM[/TD]
[TD]3:01 PM[/TD]
[TD]6:00 PM[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]8:00 AM[/TD]
[TD]12:00 PM[/TD]
[TD]6:01 PM[/TD]
[TD]9:00 PM[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]12:01 PM[/TD]
[TD]4:00 PM[/TD]
[TD]6:01 PM[/TD]
[TD]9:00 PM[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]4:01 PM[/TD]
[TD]10:00 PM[/TD]
[TD]6:01 PM[/TD]
[TD]9:00 PM[/TD]
[TD]I[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 210"]
<colgroup><col width="121" style="width:91pt"> <col width="89" style="width:67pt"> </colgroup><tbody>[TR]
[TD="width: 121"]Flight Arrival Time[/TD]
[TD="width: 89"]Flight Departure Time[/TD]
[/TR]
[TR]
[TD="align: right"]8:30 AM[/TD]
[TD="align: right"]11:10 AM[/TD]
[/TR]
[TR]
[TD="align: right"]12:05 PM[/TD]
[TD="align: right"]11:10 AM[/TD]
[/TR]
[TR]
[TD="align: right"]4:15 PM[/TD]
[TD="align: right"]11:10 AM[/TD]
[/TR]
[TR]
[TD="align: right"]8:30 AM[/TD]
[TD="align: right"]3:45 PM[/TD]
[/TR]
[TR]
[TD="align: right"]12:05 PM[/TD]
[TD="align: right"]3:45 PM[/TD]
[/TR]
[TR]
[TD="align: right"]4:15 PM[/TD]
[TD="align: right"]3:45 PM[/TD]
[/TR]
[TR]
[TD="align: right"]8:30 AM[/TD]
[TD="align: right"]7:30 PM[/TD]
[/TR]
[TR]
[TD="align: right"]12:05 PM[/TD]
[TD="align: right"]7:30 PM[/TD]
[/TR]
[TR]
[TD="align: right"]4:15 PM[/TD]
[TD="align: right"]7:30 PM[/TD]
[/TR]
[TR]
[TD="align: right"]8:30 AM[/TD]
[TD="align: right"]11:10 AM[/TD]
[/TR]
[TR]
[TD="align: right"]12:05 PM[/TD]
[TD="align: right"]11:10 AM[/TD]
[/TR]
</tbody>[/TABLE]