+ Reply to Thread
Results 1 to 6 of 6

Sort strings non alphabetically in query

  1. #1
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Sort strings non alphabetically in query

    hi,

    I have a dataset with columns: date(daily), year, season, data1, data2,....etc.

    I have a simple query to sum the data cloumns by season for each year. However this puts the years in ascending order but the seasons in alphabetical order (Autumn, spring, summer, winter). Is there a way to force the output of the query to be a set order (Summer, Autumn, Winter, Spring)?

    Thanks,

    (ps. yes, I do want summer first as this is southern hemisphere seasons)
    Last edited by HammerTime; 09-28-2009 at 09:43 PM.

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Sort strings non alphabetically in query

    You have to create a "Custom List" in Tools->Options Tab Custom Lists.

    Then select the data and sort. With options you can set the key sort order in options.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Sort strings non alphabetically in query

    Quote Originally Posted by rwgrietveld View Post
    You have to create a "Custom List" in Tools->Options Tab Custom Lists.
    I am running Office Professional Edition 2003, and I do not seem to have a Custom Lists tab in Tools>Options.

    Any other suggestions?

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Sort strings non alphabetically in query

    I am running Office Professional Edition 2003
    Me too, and I see the attached. What do you see?
    Attached Images Attached Images

  5. #5
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Sort strings non alphabetically in query

    Teylyn, that is what I see in Excel, but I thought this was the forum for Access questions? Sorry, I should have been explict: I am looking for a solution in Access.

    Not to worry, I can now copy to excel and sort it there.

    Thanks for the help.
    Last edited by HammerTime; 09-28-2009 at 09:19 PM.

  6. #6
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Sort strings non alphabetically in query

    Hi HammerTime,

    If you build a lookup table (in Access) for the seasons, you'd be able to add a sort column to it and put then in any order you wish.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

+ 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