+ Reply to Thread
Results 1 to 5 of 5

Sort by state not working

  1. #1
    Registered User
    Join Date
    05-18-2007
    Posts
    5

    Sort by state not working

    I saw this thread, http://www.excelforum.com/showthread...ght=sort+state but it doesn't seem to work for me.

    I have a huge spreadsheet, listed alphabetically by first name. I'd like to sort by state.

    I click on the entire spreadsheet (button to the left of column A) and sort, selecting the header titled "state". It sorts but it's not keeping rows together.

    example:
    Row #4: Alan X, Encino, CA.

    when sorted:
    George Y, Encino, CA

    Help?

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075
    Selecting the entire worksheet should cause the rows to sort correctly. When you click on Data, Sort and the dialog box is open, click on Options and make sure that Sort Top to Bottom is selected.

    Otherwise, can you zip a copy of your worksheet and attach it so we can see what you are working with?
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

  3. #3
    Registered User
    Join Date
    05-18-2007
    Posts
    5
    Hi Trish,

    Thanks so much for responding. Rather than sending the entire spreadsheet I copied 30 names ... and these sorted perfectly. I tried to sort the main spreadsheet again and still came up with the problem of the rows not staying intact.

    I'd really love to zip this but it's confidentail and I can't send the entire thing.

    Any other thoughts? Perhaps a cell is out of whack and I need to reformat the columns?

    TIA

  4. #4
    Registered User
    Join Date
    05-18-2007
    Posts
    5
    Ahhhh-haaaa ... I just figured it out.

    I thought it might be a formatting issue, so I went through the columns.

    Turns out a third of the entries for "state" had a space before the 2-letter abbreviation. So, when I sorted, only one name popped up for Encino, CA and this was NOT the name and address I was seeing when it was unsorted. So I thought it wasn't keeping the rows intact.

    Now that I've removed the extra space and the entire column is left justified - I see that there are actually 20 entries for Encino, CA.

    Thanks everyone ...

  5. #5
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075
    Well done! It's usually something small like that. Thanks for the feedback.

+ 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