+ Reply to Thread
Results 1 to 18 of 18

Trying to sort students according to their voting preferences to work together

  1. #1
    Registered User
    Join Date
    03-20-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Trying to sort students according to their voting preferences to work together

    Hi All,
    I've just recently been getting into Excel to make my teacher life easier. Ultimately what I'm after is a way to identify when 2 students have selected each other in the following format.
    On the y axis you have the list of all the students. On the x axis you have the same students, and the data set shows the voting preference of each student. Assume they've given 3 preferences ranked 1,2 and 3 according to who they'd most like to work with.
    Is it possible to have the students who select each other get highlighted green or something?
    Example: Student 1 selects Student 2 with their first preference and Student 2 also selects student 1 with their first preference. Then both of their number 1 voting cells turn green.

    Alternatively if that's not possible, I would also appreciate a version where preferences don't matter and you just put an X in the cells that indicate a student wants to work with another.

    Would be eternally grateful for any assistance! Thanks in advance legends!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Trying to sort students according to their voting preferences to work together

    Preferences in columns B, C and D

    3 helper columns in F, G and H
    F2=TEXTJOIN(" ",TRUE,TRANSPOSE(SORT(TRANSPOSE($A2:B2))))
    G2=TRIM(SUBSTITUTE(TEXTJOIN(" ",TRUE,TRANSPOSE(SORT(TRANSPOSE($A2:C2)))),B2,""))
    H2=TRIM(SUBSTITUTE(SUBSTITUTE(TEXTJOIN(" ",TRUE,TRANSPOSE(SORT(TRANSPOSE($A2:D2)))),B2,""),C2,""))

    Conditional formatting applies to range: =$B$2:$D$27
    CF formula 1 for direct matching: ==COUNTIFS(F$2:F$27,F2)>1
    CF formula 2 for indirect matching: ==COUNTIFS($F$2:$H$27,F2)>1

  3. #3
    Registered User
    Join Date
    03-20-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: Trying to sort students according to their voting preferences to work together

    Thanks so much for that awesome spreadsheet! For some reason I'm getting the #NAME? error. How would I be able to edit it so that I can write the names of the kids in where it says Student 1, student 2 etc

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Trying to sort students according to their voting preferences to work together

    Are you using Excel365?

  5. #5
    Registered User
    Join Date
    03-20-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: Trying to sort students according to their voting preferences to work together

    Nah, I'm using the Excel 2019 version

  6. #6
    Registered User
    Join Date
    03-20-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: Trying to sort students according to their voting preferences to work together

    I just opened it up using Excel 365 and it's coming up with the names now. How would I then change those preferences?

  7. #7
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Trying to sort students according to their voting preferences to work together

    Just type over.

  8. #8
    Registered User
    Join Date
    03-20-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: Trying to sort students according to their voting preferences to work together

    Over the formula?

  9. #9
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Trying to sort students according to their voting preferences to work together

    Yes, in columns A to D.

  10. #10
    Registered User
    Join Date
    03-20-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: Trying to sort students according to their voting preferences to work together

    Why doesn't it work for Excel 2019? Is there any way I can get it to work for offline Excel?

  11. #11
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Trying to sort students according to their voting preferences to work together

    SORT function is not available in Excel 2019.

  12. #12
    Registered User
    Join Date
    03-20-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: Trying to sort students according to their voting preferences to work together

    I cannot express my gratitude enough to you! Thank you so much!

  13. #13
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Trying to sort students according to their voting preferences to work together

    You are welcome. Sorry unable to help with older Excel version formulas.

  14. #14
    Registered User
    Join Date
    03-20-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: Trying to sort students according to their voting preferences to work together

    So sorry, just one final question. Is it possible to collate all the matches somewhere on the spreadsheet?
    I mean to have a section where all the partners are automatically generated? Or would I have to manually go through the data and find pairings?
    I've edited your version to now have 5 preferences, and up to 150 students. This question is referring to all of the green partnerings in the spreadsheet below. I just changed the colour scheme you used for my own personal preference
    Class Solver.xlsx
    Last edited by LukeMac2; 03-28-2023 at 09:24 AM.

  15. #15
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Trying to sort students according to their voting preferences to work together

    Perhaps do a filter in column A.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    03-20-2023
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: Trying to sort students according to their voting preferences to work together

    You are an absolute wizard, and I am forever in your debt. Thank you so much!

  17. #17
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Trying to sort students according to their voting preferences to work together

    You are most welcome!

  18. #18
    Registered User
    Join Date
    01-02-2021
    Location
    HUngary
    MS-Off Ver
    office2019
    Posts
    7

    Re: Trying to sort students according to their voting preferences to work together

    Hi there.
    Solution that you've got is perfect. I have another one, maybe it help as well. Only for ten students, but I think you will understand the process. Just use 1, 2, 3 as first time.
    Sort students.xlsx
    Last edited by kafi71; 03-30-2023 at 01:27 PM.

+ 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. Sorting students into groups with preferences
    By Apmtz in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-18-2022, 02:44 AM
  2. Dividing n children into classes with preferences (up to 4 preferences per child)
    By Little-Miss-Dynamite in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-18-2019, 02:39 AM
  3. Create or rank work groups based on preferences
    By stargroups in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2011, 03:10 PM
  4. [SOLVED] Sort Preferences Problem
    By Chris in forum Excel General
    Replies: 2
    Last Post: 06-12-2005, 10: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