I have a worksheet with children's names and their 3 preferences (day & time) for swimming classes. I have a second worksheet that contains a timetable with days Monday-Saturday across the top and down the side 6 available slots for each time available for each class time.
I need a VBA that will take the child's first day/time preference and if available place their name in the timetable with their corresponding grade and then highlight the child's assigned preference in blue in the first worksheet. If the first day/time preference is taken, then see if the 2nd preference is available and if this is taken, then check the 3rd preference. If all preferences are taken then highlight the child's name in red so that I know that they have not been assigned a spot in the timetable.
If all of the 6 available slots for a specific day/time are filled when it checks the child's first preference then I want it to go to the next preference and so on.
Worksheet 1
Column A = Name
Column B = Grade
Column C = Preference 1 Day
Column D = Preference 1 Time
Column E = Preference 2 Day
Column F = Preference 2 Time
Column G = Preference 3 Day
Column H = Preference 3 Time
Worksheet 2
Column A = Class Time
Column B = Monday (cells for child's name)
Column C = Grade (child's grade)
Column D = Tuesday (cells for child's name)
Column E = Grade (child's grade)
Column F = Wednesday (cells for child's name)
Column G = Grade (child's grade)
Column H = Thursday (cells for child's name)
Column I = Grade (child's grade)
Column J = Friday (cells for child's name)
Column K = Grade (child's grade)
Column L = Saturday (cells for child's name)
Column M = Grade (child's grade)
Bookmarks