+ Reply to Thread
Results 1 to 3 of 3

Sorting with links

  1. #1
    Registered User
    Join Date
    06-23-2009
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    92

    Sorting with links

    The sorting process appears not to work when sorting a range that contain links to cells with formulas. For example:


    Rank Name Total Points Points1 Points2 Points3 Points4 Points5 Points6
    --1--aaa------25--------7-------1------8-----20-------12-----9
    --2--bbb------20--------4-------2------5-----14--------9-----11
    --3--ccc------24--------6-------3------7-----12-------16-----8
    etc.


    This is a ranking of 6 separate tournaments played during the year (4 best results count). The lowest Total Points must be sorted into Rank 1, etc.
    The points1-6 from the 6 tournaments are arrived at with formulas. However, if these Points1-6 are copied into the above range from the original score sheet with =(originating cell), the sorting process doesn't work right.
    The Points1-6 must be manually copied into the above range with Paste Special, Values to make the sorting work right.

    1. What is the explanation for this?
    2. Is there a way to fill them in automatically without disturbing the sorting?

    Thank you.
    Last edited by peri1224; 11-11-2010 at 06:27 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Sorting with links

    When you sort a column with formulae in, if they have relative cell references then those references are automatically adjusted, in the same way as copy and paste adjusts cell references. Practical upshot is that when you sort, it looks like nothing has happened in all those cells... You could change them to absolute refs, but then you need to do each one individually - and change them each time teams swap over. Nightmare.

    Have you come across the RANK() function? You can use this on your original sheet to get your desired 'Rank' column, just in the wrong order. However, you can then use the MATCH function to find out how far down the rank 1 team is, then the INDEX or VLOOKUP function to return each corresponding value for Points1, Points2, etc. That'll give you formulae that can be copied down the table, and the good thing is that it automatically changes the order when one team overtakes another. However, you need to be absolutely clear how to break ties, or it won't work - and actually, tie breaks are often where the logic gets complicated. I did something similar for the 2010 FIFA World Cup to automatically generate the Preliminary Pool tables, and the tiebreaks rules go as far along the following list as necessary: if same points, then goal difference, then goals for, then who won when they played each other, then FIFA draw lots - try coding that one...

  3. #3
    Registered User
    Join Date
    06-23-2009
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    92

    Re: Sorting with links

    Thanks, but that sounds nightmarish to me, too. Looking for something simple, otherwise I have to stick to manual copying values.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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