+ Reply to Thread
Results 1 to 6 of 6

Questions on Automatically sorting

  1. #1
    Registered User
    Join Date
    07-11-2017
    Location
    Nacogdoches, Tx
    MS-Off Ver
    2010
    Posts
    4

    Questions on Automatically sorting

    I have a spreadsheet that right now I use to track a FIFA Soccer Tournament (The Gold Cup) being held in the US this month.
    There are 12 teams in 3 groups of four. The top 2 in each group will advance from the group stage, and 2 of the third place teams will as well.
    Teams get 3 points for a win, 1 for a tie, and 0 for a loss in each match they play. All teams play 3 matches.
    So teams are first sorted in descending order of the points they have.
    Next they are sorted by goal differential (goals scored for a team - the goals scored against).
    The next criteria is the number of goals each team scores.
    There are other tie-breakers, but they're not needed right now.

    Is there any way I can get Excel 2016 to Automatically sort the teams in each group when I enter their scores in another area?
    I will need to do the same thing for all 3 groups. It's just getting over the hump of making the sort become automatic.
    Thanks in advance for any help.
    Bob

    Edit: I added an attachment in the #4 post on this thread. Thanks all.
    Last edited by naccoachbob; 07-11-2017 at 12:16 PM. Reason: Adding attachment

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,239

    Re: Questions on Automatically sorting

    Welcome to the forum!

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Questions on Automatically sorting

    1 way would be to use the macro recorder. Activate it (bottom left, next to the Num Lock icon), and (carefully) go through the steps you would follow to do this manually. When complete, turn off the recorder and you now have a macro do do the heavy lifting for you.

    To use it, put in (any) shape in the sheet, and link the macro to it. Then just push that "button" and it will repeat all the steps you did
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    07-11-2017
    Location
    Nacogdoches, Tx
    MS-Off Ver
    2010
    Posts
    4

    Re: Questions on Automatically sorting

    I use the Schedule tab to enter scores from each match. That info goes to each Group tab, and all the formulas in those tabs populate the cells for W, D, L, GF, GA, +/-, Points. Then, the total of each of those cells goes to the Standings tab.
    At that tab, I have to manually highlight the cells (For Group A - cells B6-I10), and sort from larger to smaller on Pts (Points), then on +/- (Goal Differential), then GF (Goals For). The other cells are just informative, and don't come into play until later on, if even then.
    I would like to find a way so that when I enter scores in the Schedule tab, that each group in the Standings tab will automatically sort to the criteria I've used.
    If there's anything I failed to do, please let me know. I'm new to this forum.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-11-2017
    Location
    Nacogdoches, Tx
    MS-Off Ver
    2010
    Posts
    4

    Re: Questions on Automatically sorting

    Quote Originally Posted by FDibbins View Post
    1 way would be to use the macro recorder. Activate it (bottom left, next to the Num Lock icon), and (carefully) go through the steps you would follow to do this manually. When complete, turn off the recorder and you now have a macro do do the heavy lifting for you.

    To use it, put in (any) shape in the sheet, and link the macro to it. Then just push that "button" and it will repeat all the steps you did
    FDibbins, thank you for the suggestion. I've never worked with macros, but I'm going to learn a little bit about it in the next days, and give it a shot.
    Much appreciated,
    Bob

  6. #6
    Registered User
    Join Date
    07-11-2017
    Location
    Nacogdoches, Tx
    MS-Off Ver
    2010
    Posts
    4

    Re: Questions on Automatically sorting

    Quote Originally Posted by FDibbins View Post
    1 way would be to use the macro recorder. Activate it (bottom left, next to the Num Lock icon), and (carefully) go through the steps you would follow to do this manually. When complete, turn off the recorder and you now have a macro do do the heavy lifting for you.

    To use it, put in (any) shape in the sheet, and link the macro to it. Then just push that "button" and it will repeat all the steps you did
    I figured out how to Record a Macro, and after some growing pains with it, I sorted it out. I didn't know that I shouldn't use a mouse if I could help it, and got myself indoctrinated in a few keyboard shortcuts. So I'm learning stuff.
    Anyway, the macro moves the cursor inside Group A first and sorts it, then to B and sort, then to C and sort. My criteria were Pts, +/-, GF. I had set the sort up prior to recording the macro.
    Tested it out by putting in additional scores that would upset the standings. Like a charm.

    This is not the result I really wanted. I still would like to have those standings automatically sort. After group matches, the top two from each group advance, and the 2 best third place teams advance as well.
    So if this would automatically sort, I can write a cell telling it that once a certain game is played, to then go to the standings page and select the name of the appropriate team.
    Once the group phase is over, and standings are final, the Schedule page will send appropriate team names for the Semi final, and the Final.
    So if all of that could be done without me doing anything but entering scores, I'd be a happier camper.
    Attached is the updated file.

    And FDibbins, thank you for the suggestion. It's much easier than how I had been doing it before.
    Bob
    Attached Files Attached Files

+ 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] Automatically sorting
    By Texas10 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-26-2014, 10:52 AM
  2. Sorting MCQ questions alphabetically
    By kokoman789 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-08-2013, 06:26 PM
  3. Need to have a gantt chart build automatically based on a series of questions
    By kaalbdm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-30-2012, 05:55 PM
  4. Excel 2007 : sorting questions
    By dnusz in forum Excel General
    Replies: 16
    Last Post: 04-05-2012, 09:09 AM
  5. Comboboxes Questions (linking and automatically updating)
    By gmcconnell in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-10-2009, 02:58 PM
  6. Sorting + Misc questions
    By mgm123 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-04-2008, 10:33 AM
  7. Table sorting questions
    By Bri in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2006, 03:35 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