+ Reply to Thread
Results 1 to 15 of 15

Need help with Excel 2007 - table not sorting numbers correctly

  1. #1
    Registered User
    Join Date
    10-09-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    17

    Need help with Excel 2007 - table not sorting numbers correctly

    Hi,

    I'm using Excel 2007 and I've created a table and want to sort the numbers, highest to lowest. Since the values are got from another part of the spreadsheet, I've had to use commands like =sum(cell + cell etc). I can't sort these number values and I tried to change the values to real numbers, etc but nothing. This only worked when I created another table and copied all the values in the table, and it worked. Please find my excel spreadsheet and try to fix it. The problem is shown half-way down the spreadsheet and I've 'painted' the area red to highlight the troubled-area.

    Thanks

    Simon
    Attached Files Attached Files

  2. #2
    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
    53,048

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    Im not really sure what you are trying to do, but I will say that I suggest you try and restructure your data. Excel works best if all the data is in a straght-forward table with 1 set of headings across the top, and allteh data falling (sequentially - although not necessarily) under the headings
    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

  3. #3
    Registered User
    Join Date
    10-09-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    17

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    Yes, I know, it's a mess at the moment. It's in it's 'infancy'.

    Could you sort my table? I highlighted it red.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    I don't know if there are other problems on the worksheet but, I found some merged cells that prevented sorting so I unmerged them and deleted the empty cells. Another thing that I found was formulae written like this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    These are just made up references to show the type of thing I'm talking about. This could be written:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    OR

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Anyway, here is your file that can have the red area sorted.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Registered User
    Join Date
    10-09-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    17

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    Thanks heaps, I'll check it out asap.

  6. #6
    Registered User
    Join Date
    10-09-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    17

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    newdoverman, I just checked it, the red area isn't sorting....

  7. #7
    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
    53,048

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    not with your data like it is, no

    Here is a start to normalising your table. I used some very basic forumlas to sort your data for you. If this is something you can work with, I will see what we can do about working onthe rest of your summary

    (Bokke rule!!! )
    Attached Files Attached Files

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    The cell references in the RED area have to be ABSOLUTE because sorting changes the cell references and they become invalid for the records that they are attached to.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-09-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    17

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    Thanks for your help newdoverman, I have fixed 2 columns thanks to you. However, 2 columns are still not working, even though I've used ABSOLUTE commands. They're the 'Average Points scored at home' and 'Average Points scored away' columns. Both these columns don't sort the numbers from largest to smallest properly.

  10. #10
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    Check out the cell references for the teams that should be calculated against what is actually in the cells in the RED area. In many cases, they just don't match. The wrong references are being applied to teams and therefore incorrect values are being used in the calculations.

    Eg: Team Auckland's red area is tied to team Manawatu.
    Wellington is tied to Canterbury

    This is 2 out of the first 3 teams that I checked.

    All of the references will have to be verified before this has a chance to work.

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    I combined all your little tables into one table on sheet3. See how this suits your needs.
    Attached Files Attached Files

  12. #12
    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
    53,048

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    I take it my consolidated table was not what you were looking for?

  13. #13
    Registered User
    Join Date
    10-09-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    17

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    Thanks newdoverman, the table looks GREAT!!! I was thinking of a way to condense all my data and you did it perfectly.

    I checked out the cell references in my original spreadsheet and I found one error in the absolute references, which I fixed. All the references look correct now (in the red zone) but the last 2 columns still don't sort. Please find my latest updated spreadsheet attached...
    Attached Files Attached Files

  14. #14
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    I tried many times to get the last two columns to sort properly and failed miserably. I even started out by having all the tables in order of the teams and then checked that the absolute references were pointing to the correct cells using the auditing using the Trace Precedences. I got all kinds of strange results after a sort. The cell references were pointing to ridiculous locations after sorting....I just gave up and produced the table on sheet3 for you. That one sorts perfectly.

  15. #15
    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
    53,048

    Re: Need help with Excel 2007 - table not sorting numbers correctly

    My table sorts just fine - I think, hard to tell with no feedback

+ 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] Sorting numbers... correctly
    By LonesomeJoe in forum Excel General
    Replies: 6
    Last Post: 06-11-2014, 04:59 PM
  2. List of numbers not sorting correctly
    By j_ploski in forum Excel General
    Replies: 6
    Last Post: 10-29-2013, 09:05 AM
  3. Sorting column with numbers and letters Excel 2007
    By dark91zc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-06-2013, 02:31 PM
  4. numbers not sorting correctly
    By JMTMayor in forum Excel General
    Replies: 15
    Last Post: 08-01-2013, 12:00 PM
  5. Excel not sorting numbers correctly
    By lpexcel in forum Excel General
    Replies: 2
    Last Post: 04-04-2012, 08:50 AM

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