now sure how to write code to filter through 5 worksheets

kabell819

New Member
Joined
Mar 6, 2011
Messages
1
Not* sure how to write code to filter through 5 worksheets..
I have 5 different listboxes on a userform. Each listbox shows days/times (two columns) options of different courses available. When the user selects one of the class options that he wants to take, all of the other options in that specific list box need to be disabled/hidden/deleted, and so does the classes in the other 4 list boxes that conflict with the time of the class chosen. Does this make sense?
I do not now how to write "filtering/deleting" code within If statements..
Each list box contains a range of date from a separate worksheet.. they are "ENGL 104", "PSYC 102", "CSCI 240", "ECON 260", and "MGMT 217"
If it helps to understand, the 5 list boxes are named "ENGL104", "PSYC102", "CSCI240H", "ECON260", and "MGMT217H". the lists inside look like this:
<table border="0" cellpadding="0" cellspacing="0" width="368"><colgroup><col style="mso-width-source:userset;mso-width-alt:6729; width:138pt" span="2" width="184"> </colgroup><tbody><tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;width:138pt" height="20" width="184">MoWe</td> <td class="xl64" style="border-left:none;width:138pt" width="184">2:00PM - 3:15PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWe</td> <td class="xl64" style="border-top:none;border-left:none">2:00PM - 3:15PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWe</td> <td class="xl64" style="border-top:none;border-left:none">2:00PM - 3:15PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWe</td> <td class="xl64" style="border-top:none;border-left:none">3:30PM - 4:45PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWe</td> <td class="xl64" style="border-top:none;border-left:none">3:30PM - 4:45PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWe</td> <td class="xl64" style="border-top:none;border-left:none">3:30PM - 4:45PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">1:00PM - 1:50PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">1:00PM - 1:50PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">1:00PM - 1:50PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">1:00PM - 1:50PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">1:00PM - 1:50PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">1:00PM - 1:50PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">1:00PM - 1:50PM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">10:00AM - 10:50AM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">10:00AM - 10:50AM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">10:00AM - 10:50AM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">10:00AM - 10:50AM</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20">MoWeFr</td> <td class="xl64" style="border-top:none;border-left:none">10:00AM - 10:50AM</td> </tr> </tbody></table>

Any suggestions would be great! Thank you!
 
Last edited:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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