+ Reply to Thread
Results 1 to 9 of 9

Sorting a column based on data in another column? (RANK?)

Hybrid View

  1. #1
    Registered User
    Join Date
    10-04-2016
    Location
    Southend, Uk
    MS-Off Ver
    Office 2010
    Posts
    3

    Sorting a column based on data in another column? (RANK?)

    Hi

    I'm trying to create an attendance timetable for the school I work in and was hoping for some guidance on whether a final sort is possible.

    So far I have managed to set it up so that the points each class receive auto updates (through columns J&K) now I'm wondering if it is possible for the class to move into the correct league position based on their points total?

    I need to keep the class name tied to their percentage score when it is sorted but I can't seem to get it to work. I Would really appreciate any guidance on how I might approach this.

    I've attached a copy of what I've managed to do so far to provide more context

    Cheers

    Rob
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Slough
    MS-Off Ver
    Excel 2007
    Posts
    469

    Re: Sorting a column based on data in another column? (RANK?)

    This will sort it for you with a button. To change the range just edit it in VBA. If you aren't sure how to do this I can try and help.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-04-2016
    Location
    Southend, Uk
    MS-Off Ver
    Office 2010
    Posts
    3

    Re: Sorting a column based on data in another column? (RANK?)

    ah that is fantastic!, thank you for such a quick response. This will make our lives a lot easier when we do the weekly update

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Sorting a column based on data in another column? (RANK?)

    is there a lot of data underlying all of this? How are the data in column H derived? What does your expected result look like????
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Registered User
    Join Date
    10-04-2016
    Location
    Southend, Uk
    MS-Off Ver
    Office 2010
    Posts
    3

    Re: Sorting a column based on data in another column? (RANK?)

    The attendance % in column H is pulled from a report from our school's management system (SIMS). We want to provide a visual representation for the parents to view the performance of their child's class over the year and also inspire a bit a competitive spirit in the children.

  6. #6
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Sorting a column based on data in another column? (RANK?)

    Hi
    Try this
    Copy Sheet1 to Sheet2
    Clear the values of table in Sheet2
    In Sheet 2 set Position to 1, 2, 3 ... From F5 to F35
    In Sheet 2 column P from P5 use the following formula and copy down
    Formula: copy to clipboard
    =MOD(AGGREGATE(14,6,Sheet1!$L$5:$L$35+$F$5:$F$35/10000,$F$5:$F$35),1)*10000

    In Sheet2!G5 use the following formula and copy down and forward (G5:L35)
    Formula: copy to clipboard
    =INDEX(Sheet1!$G$5:$L$35,$P5,COLUMNS($A$1:A$1))

    When you update Sheet1, Sheet2 are ordered with the news values.

    See the file
    Attached Files Attached Files
    Last edited by José Augusto; 10-04-2016 at 04:44 AM. Reason: Correct formula G5 from P5 to $P5

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Sorting a column based on data in another column? (RANK?)

    So. I tired to open the macro solution. Excel didn't like it and tried to "repair" it. On what opened, Lavender now has a score of 1. is that what you see on your version???

  8. #8
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Slough
    MS-Off Ver
    Excel 2007
    Posts
    469

    Re: Sorting a column based on data in another column? (RANK?)

    Glenn, I changed Lavender to a score of one so that I could make sure the sort was working properly. Haven't had to repair it form my end. Any idea what the issue was?

  9. #9
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Sorting a column based on data in another column? (RANK?)

    Hi
    I update the file on post #6 and table are ordered.

+ 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 data in a column based on other column group
    By piggyABC in forum Excel General
    Replies: 10
    Last Post: 07-03-2015, 05:33 AM
  2. Sorting a range based on a a column and filtering that column?
    By tinkerbelle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2015, 10:30 AM
  3. [SOLVED] Formula to Rank the number of times a word appears in a column dynamic with Sorting
    By caliskier in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-02-2014, 04:26 PM
  4. Sorting all data based on data in single column (DATES)
    By subbby in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-16-2013, 08:19 AM
  5. [SOLVED] Sorting Data to New Worksheet Based off of Entry in Column A
    By dirtdoctor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-30-2013, 12:03 PM
  6. [SOLVED] Sorting data into multiple columns based on a single column
    By J.McQ in forum Excel General
    Replies: 7
    Last Post: 03-16-2013, 11:26 AM
  7. Sorting Rows Based on a Column Data
    By amtrane in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-21-2007, 05:47 PM

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