+ Reply to Thread
Results 1 to 8 of 8

Data Sorting Conundrum

  1. #1
    Registered User
    Join Date
    01-30-2025
    Location
    Norwich, England
    MS-Off Ver
    Professional Plus 2016
    Posts
    3

    Data Sorting Conundrum

    Hey,
    Background:
    We run a series of 13 modules that 240 pupils can choose to take part in.
    Each pupil orders their preferences and from this, 6 are chosen to be their modules for the year (one per half-term)
    Each group can contain a maximum of 21 pupils

    Challenge: I need to organise this data so that each pupil gets their best 6 options (not necessarily their top 6 choices) and so that, during the course of the year they do not repeat any of the modules.
    The dataset has been inputted and looks like this (pupil names down the side):

    diploma1.JPG

    Currently I use sort functions but due to the amount of data, this is very cumbersome and has to be repeated 6 times. I KNOW there must be a better way - just my knowledge isn't good enough!

    Any help or suggestions would be very welcome.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,363

    Re: Data Sorting Conundrum

    Hello SchoolData and Welcome to Excel Forum.
    I don't know what "...each pupil gets their best 6 options (not necessarily their top 6 choices)" means.
    The screen shot shows 12 column headers which I assume to be the modules. Do the numbers represent the students? If so I don't understand why the column with the header British contains duplicates of the numbers 9, 3 and 8.
    I suggest explaining in more detail and also providing us with an actual Excel worksheet as it is not possible to test formulas/code on a picture.
    Information about attaching an Excel workbook to your next post is given in the "HOW TO ATTACH YOUR SAMPLE WORKBOOK" banner at the top of the page.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365 Version 2501 64-bit
    Posts
    1,491

    Re: Data Sorting Conundrum

    SchoolData,

    Think the attached will do what you want.

    Cols A - N have "dummy" scores against the thirteen Modules for two hundred and forty Students, assuming each row shows the Student "ranks" of choices without any "ties".
    Conditional Formatting "fills" the choices between 1 - 6 in green.
    Results are shown in the Table in Cols P - AC, showing how many Students opted for what.
    Assuming you are limiting the class to twenty one Students, row 10 shows you will need six classes for each Module, except for Modules 7 and 8, which need only five, and Module 5, which needs seven Classes.
    I haven't done anything to "Stream" the different Classes, if you want to seperate your 1s and 2s from those making the Module their Third or Fourth choice, but if you want to do that, just change the CF so the Middle Choices (3 and 4) and Lower Choices (5 and 6) fill in different Colours.
    You can then "filter" each Column by colour if you want to extract the actual Names.
    Just overwrite the dummy names and values with your actuals, and see if it works for you?

    Look forward to the feedback

    Ochimus
    Attached Files Attached Files
    Last edited by Ochimus; 01-31-2025 at 03:49 PM.

  4. #4
    Registered User
    Join Date
    01-30-2025
    Location
    Norwich, England
    MS-Off Ver
    Professional Plus 2016
    Posts
    3

    Re: Data Sorting Conundrum

    Module selections 2.xlsx

    Hopefully I have managed to attach a file here - the Ochimus template (thanks!) with actual data.

    Things are never easy. I have to limit the number of classes per year to 6 (1 per half-term), although max pupils per class/module could increase to 25.
    What I need the sheet to do is identify which 25 pupils would be in which group for each of the half-terms:
    Autumn 1
    Autumn 2
    Spring 1
    Spring 2
    Summer 1
    Summer 2

    Does that make sense?! I am sorry for the poor expalantion.

    Thank you for your time looking at this - much appreciated!

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,363

    Re: Data Sorting Conundrum

    This is a brute force proposal which hopefully will help until someone proposes a more elegant one.
    1. The original table is copied six times, once for each half-term and is populated with formulas like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    2. Each table has an assignment range for that half-term to its right. The first column of each of those is populated using formulas like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The remaining columns are populated using formulas like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3. To the right of each assignment range is the display of students in each module, which are populated using formulas like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note that the display for Autumn 1 is in columns Z:AK and for Summer 2 is in columns HT:IE.
    Let us know if you have any questions.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365 Version 2501 64-bit
    Posts
    1,491

    Re: Data Sorting Conundrum

    SchoolData,

    I put together the attached CLASSES worksheet Table which "assigns" the Students to a class in each of the six Terms for the subjects they scored as 1 - 6.

    The basis of the totals is that I sorted everyone's 1 Score and set that as Autumn 1, then the 2s as Autumn 2, and so on, ending the Summer 2 Term with everyone's 6s.

    Fortunately, as Cols A - E are a Table, you can filter any or all the Columns by Name, Subject or Term, and change the Terms as needed.

    The Pivot Table in Cols I - J gives you the Overview, summarising how many Students are currently assigned to each Term in each Subject.

    If you change any Terms in Cols E, click on any cell in the Pivot, click 'Refresh', and you will see the revised Summaries.

    Hope it helps, as you can simply "overwrite" the dummy names with your real ones.

    Ochimus
    Attached Files Attached Files
    Last edited by Ochimus; 02-07-2025 at 09:24 PM.

  7. #7
    Registered User
    Join Date
    01-30-2025
    Location
    Norwich, England
    MS-Off Ver
    Professional Plus 2016
    Posts
    3

    Re: Data Sorting Conundrum

    Thank you Ochimus & JeteMC.
    My one sticking point is that I have to limit the group sizes to 25 max due to staff numbers.
    It doesn't matter if pupils end up with their 7th, 8th or 9th choices, if this is needed to maintain group sizes.
    Any thoughts would be gratefully received!

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,363

    Re: Data Sorting Conundrum

    Looking at the file attached to post #5, none of the half terms have more than 25 students in a module.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] For me this is a conundrum, same formula two data sources, and one not working
    By Tresfjording in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-09-2024, 06:04 PM
  2. Data consolidation conundrum...
    By andrewj1981 in forum Excel General
    Replies: 5
    Last Post: 03-15-2020, 05:37 PM
  3. [SOLVED] An algebra Conundrum
    By trevor69 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-15-2015, 07:42 PM
  4. Interesting data extraction and calculation conundrum
    By jrothstein in forum Excel General
    Replies: 1
    Last Post: 07-22-2012, 01:55 AM
  5. Date Conundrum
    By martins in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-10-2006, 10:15 AM
  6. Reporting conundrum with fixed data
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2006, 08:10 PM
  7. VBA conundrum
    By csi in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 10-27-2005, 03:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1