+ Reply to Thread
Results 1 to 13 of 13

Data sort on 2 columns incorrect on one line

  1. #1
    Registered User
    Join Date
    08-12-2004
    Location
    Mendoza, Argentina
    MS-Off Ver
    Office Professional 2003
    Posts
    89

    Data sort on 2 columns incorrect on one line

    Good day all.

    I have a spread sheet of 1319 lines and 15 columns wide, the first 3 lines are headers and split pane frozen.

    When I data sort columns K are primary sort column in ascending order and secondary sort column J also in ascending order, there is one row (that I have noticed) that does not sort correctly in the secondary column.

    If a sort is done on column J only, it is correct.

    I have changed the name in the secondary column to xxxxxxx but that one row still does not sort correctly.

    Anyone any ideas what is preventing the data sort?

    Excel sorting error.jpg

    I have just rewritten a new row with the data, deleted the original row and still the same problem.
    Last edited by thadacto; 11-06-2013 at 06:52 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Data sort on 2 columns incorrect on one line

    Hi,

    Could you please upload your workbook for me to investigate this issue?

    Thanks

  3. #3
    Registered User
    Join Date
    08-12-2004
    Location
    Mendoza, Argentina
    MS-Off Ver
    Office Professional 2003
    Posts
    89

    Re: Data sort on 2 columns incorrect on one line

    Thanks for the help, ajryan88.

    Errr, how do I upload a work book?

    Thanks.

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Data sort on 2 columns incorrect on one line

    No worries.

    Click on Reply --> Go Advanced --> Manage Attachments

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Data sort on 2 columns incorrect on one line

    While you are composing a post, click on Go Advanced just below the Edit Window. From there, scroll down to Manage Attachments, then click on Add Files | Select Files and navigate to where the file is on your PC and double-click the file icon. Then click on Upload Files, then Done, and finally, once you have finished composing your post, click on Submit Reply.

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    08-12-2004
    Location
    Mendoza, Argentina
    MS-Off Ver
    Office Professional 2003
    Posts
    89

    Re: Data sort on 2 columns incorrect on one line

    I Think I've attached the file!

    Yes, Got it!

    The particular row that is out of order is 764
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-12-2004
    Location
    Mendoza, Argentina
    MS-Off Ver
    Office Professional 2003
    Posts
    89

    Re: Data sort on 2 columns incorrect on one line

    Thanks, Pete; yep, I got it.

    But how does one upload and an avatar? I couldn't find any help on that.

  8. #8
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: Data sort on 2 columns incorrect on one line

    K765:K858 has spaces at the end of 'O'Neill Power Esq'


    'O'Neill Power Esq' is not equal to 'O'Neill Power Esq '
    That is why it goes wrong
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  9. #9
    Registered User
    Join Date
    08-12-2004
    Location
    Mendoza, Argentina
    MS-Off Ver
    Office Professional 2003
    Posts
    89

    Re: Data sort on 2 columns incorrect on one line

    Thanks, Pete; yep, I got it.

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Data sort on 2 columns incorrect on one line

    Quote Originally Posted by thadacto View Post
    But how does one upload and an avatar? I couldn't find any help on that.
    You have to make a certain number of posts before you can upload an avatar - I think it is 100 posts.

    Pete

  11. #11
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Data sort on 2 columns incorrect on one line

    Hi,

    K765:K774 contains a redundant space at the end of the cell, and K775:K858 contains a "." and a redundant space at the end of the cell.

    So the sort is working perfectly, but the cells don't contain the same last name (although it may appear as though they do).

    I would recommend trimming all cells on the worksheet to remove any other redundant spaces and give it another go:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Hope this helps

  12. #12
    Registered User
    Join Date
    08-12-2004
    Location
    Mendoza, Argentina
    MS-Off Ver
    Office Professional 2003
    Posts
    89

    Re: Data sort on 2 columns incorrect on one line

    Thanks, Willem; that correction has cured the problem. Well spotted. I have worked on it for over 4 hours and couldn't find the answer!

    Thanks, Pete, re the avatar.

    The site seems to hide things away in places you don't expect to find them!

  13. #13
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Data sort on 2 columns incorrect on one line

    Please don't forget to mark this thread as solved, and please click on the * next to any post(s) that have been helpful to you

    Have a great day

  14. #14
    Registered User
    Join Date
    08-12-2004
    Location
    Mendoza, Argentina
    MS-Off Ver
    Office Professional 2003
    Posts
    89

    Re: Data sort on 2 columns incorrect on one line

    Many thanks to you also, ajryan88.
    I've now run TRIM for the whole range.

+ 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. Sort data - every 6th line
    By AngelaP in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2012, 08:05 AM
  2. Incorrect linked data when launching spreadsheet from a command line.
    By kevlar3d in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2012, 11:28 PM
  3. Data line is incorrect when there is two lines of data
    By KanBama in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 03-05-2012, 09:50 AM
  4. Line-up Columns by Sort and Leaving Blanks for no data.
    By peaceeasy in forum Excel General
    Replies: 1
    Last Post: 07-11-2011, 07:35 PM
  5. data sort is not including all columns in sort
    By Tracy in forum Excel General
    Replies: 1
    Last Post: 10-03-2005, 08:05 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