Sheet1 contains a list of course codes and the dates the courses are running
eg.
CSB00 09-Jan-2006
CSB00 10-Jan-2006
CSB01 09-Jan-2006
CSB02 10-Jan-2006

Sheet2 contains a list of students and the courses assigned to the students
eg.
James CSB00 Dep1
Jones CSB00 Dept1
Sam CSB00 Dept2
John CSB00 Dept2
(Data in different cells for name, course, Dept)

Please a macro or VB to assign students to courses (maximum students for the
sake of this example is 2 students per course date). Students should be
distributed to courses from all applicable departments ie one fron Dept1 and
the other from Dept2. Please make it as general as possible by making the
number of courses, number of students and number of departments all as
variables

You may assume 20 departments, 25 courses and as many as 100 students.
Classrooms may take a maximum of 12 students. Sufficient courses will be
planned to accommodate all students.

Output should lok like this:

Student Dept Course CourseDate
James Dept1 CSB00 09-Jan-2006
Sam Dept2 CSB00 09-Jan-2006

Jones Dept1 CSB00 10-Jan-2006
John Dept2 CSB00 10- Jan-2006

Thanks in advance

--
JA