+ Reply to Thread
Results 1 to 8 of 8

Custom sort not working correctly

  1. #1
    Registered User
    Join Date
    04-03-2023
    Location
    United States
    MS-Off Ver
    2010
    Posts
    4

    Custom sort not working correctly

    I'm on windows 10 running MS Offie 2010.
    I am using Custom Sort and one of the sort columns isn't working as it should. I've taken a portion of the original spreadsheet and hand entered a few rows in order to try and solve the problem. Attached is the small spreadsheet that I'm using to troubleshoot.

    There are 3 columns. The Custom Sort is 1) Sort on Partner, (small to large), 2) sort on Role, (custom values entered) and 3) sort on last name. It appears that the sort on last name isn't working. For troubleshooting I've changed the sort from A-Z to Z-A and the sort doesn't change. I change the sort on the other 2 columns and the sort order changes as it should. I hand entered the data so there shouldn't be any hidden/funky data. I'm stumped.

    Attached is a file with 2 worksheets. One is the raw data is one is my goal. I want all the partners listed together (in any order, just together), sorted by the Last Name of the veteran and the veteran listed first in the pairing. If there is another way to get these results I'm all ears!

    Thanks for your help.
    Attached Files Attached Files
    Last edited by jhousemb; 04-03-2023 at 06:45 PM.

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Custom sort not working correctly

    could you re-attach your excel file with your initial data and expected result ?

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,417

    Re: Custom sort not working correctly

    If you are doing the sort manually, field by field, I suggest you sort the columns in reverse order of priority. That is, Last Name, Role, then Partner.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    04-03-2023
    Location
    United States
    MS-Off Ver
    2010
    Posts
    4

    Re: Custom sort not working correctly

    I just did. Thanks.

  5. #5
    Registered User
    Join Date
    04-03-2023
    Location
    United States
    MS-Off Ver
    2010
    Posts
    4

    Re: Custom sort not working correctly

    Thanks for the suggestion but it doesn't work. Again, if I change the 3rd sort item, in this case Partner from smallest to largest; to largest to smallest there is no change in the results. It's like for some reason it is ignoring the last/3rd sort item.

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Custom sort not working correctly

    maybe like this

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


    In Excel, you can perform a dependent custom sort list by creating multiple custom lists and using them in combination for sorting. Here are the steps:
    1. Create a list of values that you want to use as the primary sorting criteria in a separate column or worksheet.
    2. Create a list of values that you want to use as the secondary sorting criteria in a separate column or worksheet.
    3. Select the column of data that you want to sort.
    4. Click on the "Sort" button in the "Data" tab.
    5. In the "Sort" dialog box, select the column you want to sort by and then select "Custom List" from the "Order" drop-down list.
    6. Click on the "Import" button and select the range that contains the custom list you created in step 1.
    7. Click "Add Level" to add a second level of sorting criteria.
    8. Select the column you want to sort by for the second level of sorting and then select "Custom List" from the "Order" drop-down list.
    9. Click on the "Import" button and select the range that contains the custom list you created in step 2.
    10. Click "OK" to close the "Custom Lists" dialog box.
    11. Click "OK" again to close the "Sort" dialog box and sort your data.
    12. Excel will now sort the data based on your custom lists in the order you specified, with the primary sorting criteria taking precedence over the secondary criteria.
    Note: You can add additional levels of sorting criteria by clicking "Add Level" and repeating steps 8 to 10.


    Partner last Role last Role IF Partner
    1
    bevill veteran bevill guardian
    1
    1
    1
    bevill guardian bevill veteran
    1
    1
    6
    Gabriel veteran Spencer guardian
    6
    2
    6
    Spencer guardian Gabriel veteran
    6
    2
    3
    Guerra veteran Guerra guardian
    3
    3
    3
    Guerra guardian Guerra veteran
    3
    3
    2
    jung veteran De Santis guardian
    2
    4
    2
    De Santis guardian jung veteran
    2
    4
    4
    Lerner veteran Lerner guardian
    4
    5
    4
    Lerner guardian Lerner veteran
    4
    5
    5
    Thaler veteran Lerner guardian
    5
    6
    5
    Lerner guardian Thaler veteran
    5
    6
    expected result
    Attached Files Attached Files
    Last edited by sandy666; 04-03-2023 at 08:28 PM.

  7. #7
    Registered User
    Join Date
    04-03-2023
    Location
    United States
    MS-Off Ver
    2010
    Posts
    4

    Re: Custom sort not working correctly

    Thanks for the info. The formula that you posted may work but not practical since what I posted was a sample of the larger spreadsheet that I am asking about. The entire spreadsheet has 50+ rows. I attached a screenshot of my Custom Sort screen.
    Attached Images Attached Images

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Custom sort not working correctly

    solution was tailored to your example (post#1)
    so get it or forget it
    have a nice day

+ 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. Custom Sort not working
    By YellaBooshty in forum Excel General
    Replies: 1
    Last Post: 02-10-2020, 05:29 AM
  2. Custom sort w. bracket wont apply correctly
    By m_nissen in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 05-09-2019, 09:56 AM
  3. [SOLVED] Custom Sort not working
    By OxJ in forum Excel General
    Replies: 5
    Last Post: 03-31-2017, 09:25 AM
  4. [SOLVED] Custom sort is not working
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-01-2015, 08:52 PM
  5. Excel 2007 : Custom List does not sort correctly
    By tanda in forum Excel General
    Replies: 0
    Last Post: 11-15-2011, 07:32 PM
  6. Replies: 5
    Last Post: 08-18-2010, 07:10 PM
  7. AutoFilter Sort Option Not Working Correctly
    By Bud in forum Excel General
    Replies: 1
    Last Post: 10-04-2007, 03:29 PM

Tags for this Thread

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