vba to assign work to students

stephanietnt

New Member
Joined
Sep 6, 2023
Messages
1
Office Version
  1. 2010
Platform
  1. Windows
Good day, i know very little about vba and i am in need of code to assist with a class. This is what is needed:

The class has about 30 students, male and female
everyday for 48 days, 5 students are needed to carry out 5 different assignments.
3 out of 5 of those assignments are only for the men, while the other two, both men and women can do.
A person should only be used twice only when everyone else has been selected

So when the code is run i would like to get a table showing who will be handling the 5 assignments for each of the 48 days

Can anyone get me started with some simple code. I would really appreciate it.
thank you
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Fun, you should make this their assignment for Day 1.

With 48 days, 5 assignments per day, if there are 30 students, they each will do an assignment eight out of the 48 days unless the gender requirement changes that. I think the person who solves this will need to know the total number of students, and how many are male.

I am not sure it will require code...

Doug
 
Upvote 0
Good day, i know very little about vba and i am in need of code to assist with a class. This is what is needed:

The class has about 30 students, male and female
everyday for 48 days, 5 students are needed to carry out 5 different assignments.
3 out of 5 of those assignments are only for the men, while the other two, both men and women can do.
A person should only be used twice only when everyone else has been selected

So when the code is run i would like to get a table showing who will be handling the 5 assignments for each of the 48 days

Can anyone get me started with some simple code. I would really appreciate it.
thank you
Are you still using Excel 2010 and if not, what version are you using?

How do you want the assignment table to be structured?

Three variables, names, assignments and dates.
One to go along the top to form the columns, one to go in column one to form the rows and the remaining one to go in the body of the table.
 
Upvote 0
Are you still using Excel 2010 and if not, what version are you using?
Seeing as how they just joined the forum 2 days ago, I would guess that is probably accurate.
 
Upvote 0
Here is a possible solution if there are 30 students, 20 male, 10 female...
Book1
ABCDEFGHIJ
1DAYASSIGNMENT 1_MALEASSIGNMENT 2_MALEASSIGNMENT 3_MALEASSIGNMENT 4_EITHERASSIGNMENT 5_EITHERMALESFEMALES
21M1M2M3M4F1M1F1
32M5M6M7M8F2M2F2
43M9M10M11F3F4M3F3
54M12M13M14F5F6M4F4
65M15M16M17F7F8M5F5
76M18M19M20F9F10M6F6
87M1M2M3M4F1M7F7
98M5M6M7M8F2M8F8
109M9M10M11F3F4M9F9
1110M12M13M14F5F6M10F10
1211M15M16M17F7F8M11
1312M18M19M20F9F10M12
1413M1M2M3M4F1M13
1514M5M6M7M8F2M14
1615M9M10M11F3F4M15
1716M12M13M14F5F6M16
1817M15M16M17F7F8M17
1918M18M19M20F9F10M18
2019M1M2M3M4F1M19
2120M5M6M7M8F2M20
2221M9M10M11F3F4
2322M12M13M14F5F6
2423M15M16M17F7F8
2524M18M19M20F9F10
2625M1M2M3M4F1
2726M5M6M7M8F2
2827M9M10M11F3F4
2928M12M13M14F5F6
3029M15M16M17F7F8
3130M18M19M20F9F10
3231M1M2M3M4F1
3332M5M6M7M8F2
3433M9M10M11F3F4
3534M12M13M14F5F6
3635M15M16M17F7F8
3736M18M19M20F9F10
3837M1M2M3M4F1
3938M5M6M7M8F2
4039M9M10M11F3F4
4140M12M13M14F5F6
4241M15M16M17F7F8
4342M18M19M20F9F10
4443M1M2M3M4F1
4544M5M6M7M8F2
4645M9M10M11F3F4
4746M12M13M14F5F6
4847M15M16M17F7F8
4948M18M19M20F9F10
Sheet2
 
Upvote 0
Here is a possible solution if there are 30 students, 20 male, 10 female...
Book1
ABCDEFGHIJ
1DAYASSIGNMENT 1_MALEASSIGNMENT 2_MALEASSIGNMENT 3_MALEASSIGNMENT 4_EITHERASSIGNMENT 5_EITHERMALESFEMALES
21M1M2M3M4F1M1F1
32M5M6M7M8F2M2F2
43M9M10M11F3F4M3F3
54M12M13M14F5F6M4F4
65M15M16M17F7F8M5F5
76M18M19M20F9F10M6F6
87M1M2M3M4F1M7F7
98M5M6M7M8F2M8F8
109M9M10M11F3F4M9F9
1110M12M13M14F5F6M10F10
1211M15M16M17F7F8M11
1312M18M19M20F9F10M12
1413M1M2M3M4F1M13
1514M5M6M7M8F2M14
1615M9M10M11F3F4M15
1716M12M13M14F5F6M16
1817M15M16M17F7F8M17
1918M18M19M20F9F10M18
2019M1M2M3M4F1M19
2120M5M6M7M8F2M20
2221M9M10M11F3F4
2322M12M13M14F5F6
2423M15M16M17F7F8
2524M18M19M20F9F10
2625M1M2M3M4F1
2726M5M6M7M8F2
2827M9M10M11F3F4
2928M12M13M14F5F6
3029M15M16M17F7F8
3130M18M19M20F9F10
3231M1M2M3M4F1
3332M5M6M7M8F2
3433M9M10M11F3F4
3534M12M13M14F5F6
3635M15M16M17F7F8
3736M18M19M20F9F10
3837M1M2M3M4F1
3938M5M6M7M8F2
4039M9M10M11F3F4
4140M12M13M14F5F6
4241M15M16M17F7F8
4342M18M19M20F9F10
4443M1M2M3M4F1
4544M5M6M7M8F2
4645M9M10M11F3F4
4746M12M13M14F5F6
4847M15M16M17F7F8
4948M18M19M20F9F10
Sheet2
I think that we may be missing some information here.

We obviously don't know the mix but it may be that each student needs to do each assignment at least x times and that there needs to be at least x number of days between
a student doing an assignment.
 
Upvote 0
Yeah, the OP is leaving a lot of questions hanging on this...
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
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