VBA to build schedule

johnsmith5050

New Member
Joined
Jun 22, 2014
Messages
8
Hello

I am looking to use vba to tidy up an unstructured list under relevant column headings.


Currently the data has one unique row for each class/student combination. Instead I am hoping to have one row per unique student to show all classes they may have assigned to them in a single row.

ClassMorning/AfternoonName
MathAfternoonScott
EnglishMorningScott


Example of updated grouping / structure:

Name | Morning 1 | Morning 2 | Morning 3 | Morning 4| Morning 5 | Morning 6 | Afternoon 1 | Afternoon 2 | Afternoon 3 | Afternoon 4 | Afternoon 5 | Afternoon 6
Scott | French | English | Chemistry | Biology | <Blank> | <Blank> | PE | Software | Math | Physics | <Blank | Blank>


The number of classes a student can have can vary so some may have more entries in the list than others. The maximum currently for morning or afternoon is 6 subjects for each session. Cell can remain blank if there is less subjects assigned than the maximum.

Thanks in advance for any help, please let me know if more information may be required.

EDIT:
Ideally it can review the output on 'tab 1' and create the new structured output on 'tab 2' to avoid modifying original data.
 
Last edited by a moderator:

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,224,823
Messages
6,181,171
Members
453,021
Latest member
Justyna P

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