Write a sub procedure for a timetable

guthrie.23

New Member
Joined
Nov 4, 2010
Messages
1
I need help with this one, I am new to VBA and cannot figure out how to do this. I am using Excel 2007.

What I need to do is take data from this table and have it generate a timetable.



<table border="0" cellpadding="0" cellspacing="0" width="507"><col style="width: 107pt;" width="142"> <col style="width: 101pt;" width="134"> <col style="width: 90pt;" width="120"> <col style="width: 83pt;" width="111"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl63" style="height: 15pt; width: 107pt;" height="20" width="142">Meeting Type</td> <td class="xl63" style="border-left: medium none; width: 101pt;" width="134">Start Time</td> <td class="xl64" style="border-left: medium none; width: 90pt;" width="120">End Time</td> <td class="xl63" style="border-left: medium none; width: 83pt;" width="111">Location</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">Faculty Meeting</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">10</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">12</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">UA1220</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">Lunch</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">13</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">14</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">UB Cafteria</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">Teaching</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">15</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">17</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">J125</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">Office Hours</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">17</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">18</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">UB3064</td> </tr> </tbody></table>
Below is what it needs to look like after the sub procedure is ran, only with the appropriate fill designated to each time block.


<table border="0" cellpadding="0" cellspacing="0" width="396"><col style="width: 107pt;" width="142"> <col style="width: 101pt;" width="134"> <col style="width: 90pt;" width="120"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 107pt;" height="20" width="142">
</td> <td colspan="2" class="xl66" style="width: 191pt;" width="254">11/4/2010 13:40</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">8:00</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">9:00</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">10:00</td> <td>Faculty Meeting
</td> <td>UA1220
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">11:00</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">12:00</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">13:00</td> <td>Lunch
</td> <td>UB Cafeteria
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">14:00</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">15:00</td> <td>Teaching
</td> <td>J125
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">16:00</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">17:00
</td> <td>Office Hours
</td> <td>UB3064
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">18:00</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">19:00</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt;" align="right" height="20">20:00</td> <td>
</td> <td>
</td> </tr> </tbody></table>

I need SERIOUS help with this. Thanks everyone!
 

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