I like to create a macro spreadsheet that can help me to automate the class allocation for my students.

My tasks include the following:-

1. Open an excel file and save as another file (done)

2. Filter Group 1 students

3. Allocate them evenly in G,H,I classes

4. Filter Group 2 students with the remaining students

5. Allocate them evenly in A,B,C,D,E,F,G,H,I

6. With the remaining students, using the entry score in descending order, allocate them into A,B,C,D,E,F,G,H,I for the 1st 9 remaining students then the next 9 remaining students start from B,C,D,E,F,G,H,I and go back to A and the 3rd group start from C,D,E,F,G,H,I and A, B and so on.

7. At the same time, have to ensure that the no. of students in each class is approximately the same (difference of 1-2).

Can anyone help?

Thanks in advance