Next Available Slot

termsig

New Member
Joined
Mar 3, 2015
Messages
5
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]
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top