I am trying to create a spreadsheet (vba code) that will take all of the different times that different subjects run at uni and then run a lot of loops to find all the possible outcomes where there are no clashes between all the subjects and their classes.
I would then like the outcomes to be set to a certain value so that they can be displayed on a separate sheet visually on a timetable.

I am stuck however, and don't know where to start with the loops.

Does somebody know how to do this or has done something like it before and can help out?

Cheers