Hello,
Trying get my head around if there is any option to resolve below issue within formula or there is no other way than VBA.
I'm trying find next available slot based on the certain criteria that times don't overlap each other.
End Result
[TABLE="class: grid, width: 400"]
<tbody>[TR]
[TD="width: 64"]Time[/TD]
[TD="width: 64"]Room1[/TD]
[TD="width: 64"]Room2[/TD]
[TD="width: 64"]Room3[/TD]
[TD="width: 64"]Room4[/TD]
[TD="width: 64"]Room5[/TD]
[/TR]
[TR]
[TD="align: right"]0:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]1:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]3:00[/TD]
[TD]Client 1[/TD]
[TD]Client 2[/TD]
[TD]Client 3[/TD]
[TD]Client 4[/TD]
[TD]Client 5[/TD]
[/TR]
[TR]
[TD="align: right"]4:00[/TD]
[TD]Client 6[/TD]
[TD]Client 7[/TD]
[TD]Client 8[/TD]
[TD]Client 9[/TD]
[TD]Client 10[/TD]
[/TR]
[TR]
[TD="align: right"]5:00[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 8[/TD]
[TD]Client 9[/TD]
[TD]Client 10[/TD]
[/TR]
[TR]
[TD="align: right"]6:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 9[/TD]
[TD]Client 10[/TD]
[/TR]
[TR]
[TD="align: right"]7:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 10[/TD]
[/TR]
[TR]
[TD="align: right"]8:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]9:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]11:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]12:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]13:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]14:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]15:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]16:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]17:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]18:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]19:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]20:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]21:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]22:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Based on the below data
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD="width: 64"][/TD]
[TD="width: 64"]Start[/TD]
[TD="width: 64"]Finish[/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 3[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 4[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 5[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 6[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 7[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 8[/TD]
[TD="align: right"]4:00[/TD]
[TD="align: right"]6:00[/TD]
[/TR]
[TR]
[TD]Client 9[/TD]
[TD="align: right"]4:00[/TD]
[TD="align: right"]7:00[/TD]
[/TR]
[TR]
[TD]Client 10[/TD]
[TD="align: right"]4:00[/TD]
[TD="align: right"]8:00[/TD]
[/TR]
[TR]
[TD]Client 11[/TD]
[TD="align: right"]7:00[/TD]
[TD="align: right"]9:00[/TD]
[/TR]
[TR]
[TD]Client 12[/TD]
[TD="align: right"]7:00[/TD]
[TD="align: right"]9:00[/TD]
[/TR]
[TR]
[TD]Client 13[/TD]
[TD="align: right"]7:00[/TD]
[TD="align: right"]9:00[/TD]
[/TR]
[TR]
[TD]Client 14[/TD]
[TD="align: right"]7:00[/TD]
[TD="align: right"]9:00[/TD]
[/TR]
[TR]
[TD]Client 15[/TD]
[TD="align: right"]11:00[/TD]
[TD="align: right"]12:00[/TD]
[/TR]
[TR]
[TD]Client 16[/TD]
[TD="align: right"]11:00[/TD]
[TD="align: right"]12:00[/TD]
[/TR]
[TR]
[TD]Client 17[/TD]
[TD="align: right"]11:00[/TD]
[TD="align: right"]12:00[/TD]
[/TR]
[TR]
[TD]Client 18[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
[TR]
[TD]Client 19[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
[TR]
[TD]Client 20[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
[TR]
[TD]Client 21[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
[TR]
[TD]Client 22[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
[TR]
[TD]Client 23[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
</tbody>[/TABLE]
Trying get my head around if there is any option to resolve below issue within formula or there is no other way than VBA.
I'm trying find next available slot based on the certain criteria that times don't overlap each other.
End Result
[TABLE="class: grid, width: 400"]
<tbody>[TR]
[TD="width: 64"]Time[/TD]
[TD="width: 64"]Room1[/TD]
[TD="width: 64"]Room2[/TD]
[TD="width: 64"]Room3[/TD]
[TD="width: 64"]Room4[/TD]
[TD="width: 64"]Room5[/TD]
[/TR]
[TR]
[TD="align: right"]0:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]1:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]3:00[/TD]
[TD]Client 1[/TD]
[TD]Client 2[/TD]
[TD]Client 3[/TD]
[TD]Client 4[/TD]
[TD]Client 5[/TD]
[/TR]
[TR]
[TD="align: right"]4:00[/TD]
[TD]Client 6[/TD]
[TD]Client 7[/TD]
[TD]Client 8[/TD]
[TD]Client 9[/TD]
[TD]Client 10[/TD]
[/TR]
[TR]
[TD="align: right"]5:00[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 8[/TD]
[TD]Client 9[/TD]
[TD]Client 10[/TD]
[/TR]
[TR]
[TD="align: right"]6:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 9[/TD]
[TD]Client 10[/TD]
[/TR]
[TR]
[TD="align: right"]7:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 10[/TD]
[/TR]
[TR]
[TD="align: right"]8:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]9:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]11:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]12:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]13:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]14:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]15:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]16:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]17:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]18:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]19:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]20:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]21:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]22:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Based on the below data
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD="width: 64"][/TD]
[TD="width: 64"]Start[/TD]
[TD="width: 64"]Finish[/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 3[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 4[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 5[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 6[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 7[/TD]
[TD="align: right"]3:00[/TD]
[TD="align: right"]4:00[/TD]
[/TR]
[TR]
[TD]Client 8[/TD]
[TD="align: right"]4:00[/TD]
[TD="align: right"]6:00[/TD]
[/TR]
[TR]
[TD]Client 9[/TD]
[TD="align: right"]4:00[/TD]
[TD="align: right"]7:00[/TD]
[/TR]
[TR]
[TD]Client 10[/TD]
[TD="align: right"]4:00[/TD]
[TD="align: right"]8:00[/TD]
[/TR]
[TR]
[TD]Client 11[/TD]
[TD="align: right"]7:00[/TD]
[TD="align: right"]9:00[/TD]
[/TR]
[TR]
[TD]Client 12[/TD]
[TD="align: right"]7:00[/TD]
[TD="align: right"]9:00[/TD]
[/TR]
[TR]
[TD]Client 13[/TD]
[TD="align: right"]7:00[/TD]
[TD="align: right"]9:00[/TD]
[/TR]
[TR]
[TD]Client 14[/TD]
[TD="align: right"]7:00[/TD]
[TD="align: right"]9:00[/TD]
[/TR]
[TR]
[TD]Client 15[/TD]
[TD="align: right"]11:00[/TD]
[TD="align: right"]12:00[/TD]
[/TR]
[TR]
[TD]Client 16[/TD]
[TD="align: right"]11:00[/TD]
[TD="align: right"]12:00[/TD]
[/TR]
[TR]
[TD]Client 17[/TD]
[TD="align: right"]11:00[/TD]
[TD="align: right"]12:00[/TD]
[/TR]
[TR]
[TD]Client 18[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
[TR]
[TD]Client 19[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
[TR]
[TD]Client 20[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
[TR]
[TD]Client 21[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
[TR]
[TD]Client 22[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
[TR]
[TD]Client 23[/TD]
[TD="align: right"]12:00[/TD]
[TD="align: right"]14:00[/TD]
[/TR]
</tbody>[/TABLE]