+ Reply to Thread
Results 1 to 10 of 10

Sorting issue

Hybrid View

  1. #1
    Registered User
    Join Date
    06-04-2008
    Posts
    16

    Sorting issue

    I am trying to sort first by year then by term (i.e. summer, fall, spring) for a school year. I know how to do custom sort so i set up a list. The problem comes here:

    Term Year

    Spring 2002
    Summer 2002
    Summer 2002
    Summer 2002
    Summer 2003
    Summer 2003
    Summer 2004
    Summer 2004
    Summer 2004
    Summer 2004
    Summer 2004
    Summer 2004
    Fall 2005

    Summer 2005
    Summer 2005

    Because there is no spring 2005, the last entry it sees is summer so it puts fall 2005 when in reality i want summer 2005 next. How do i sort so that any time there is a new year in the year column, it starts the sort over with spring in the term column? Thanks!

  2. #2
    Registered User
    Join Date
    06-04-2008
    Posts
    16

    sorting issue

    I am trying to sort first by year then by term (i.e. summer, fall, spring) for a school year. I know how to do custom sort so i set up a list. The problem comes here:

    Term Year

    Spring 2002
    Summer 2002
    Summer 2002
    Summer 2002
    Summer 2003
    Summer 2003
    Summer 2004
    Summer 2004
    Summer 2004
    Summer 2004
    Summer 2004
    Summer 2004
    Fall 2005
    Summer 2005

    Summer 2005

    Because there is no spring 2005, the last entry it sees is summer so it puts fall 2005 when in reality i want summer 2005 next. How do i sort so that any time there is a new year in the year column, it starts the sort over with spring in the term column? Thanks!

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Cross posting

    Hi,

    you posted the same thread in the Charting Forum.
    Maybe you should delete that one or at least refer to it in this post so that different members don't try to answer the two posts.
    Cheers

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,459
    Personally I would use a helper column and a lookup table.

    Lookup table named as Season would be a simple 2 column affair

    Summer 1
    Spring 2
    Fall 3

    Then, assuming your data is in A1:B16, the helper columns would be labelled Season and in C2,

    =VLOOKUP(A2,SEASON,2,FALSE)

    Copied down to C16.
    Now sort Year and Season.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,459
    wizgf19, please don't post the same question in multiple forums.


    Thanks, arthurbr.

  6. #6
    Registered User
    Join Date
    06-04-2008
    Posts
    16
    Summer 2001 summer
    Fall 2002 fall
    Fall 2002 fall
    Spring 2002 spring
    Summer 2002 summer
    Summer 2002 summer


    columns are (term, year, =VLOOKUP(A2,$A$56:$B$58,1,FALSE)

    vlookup table is

    summer 1
    spring 2
    fall 3

    if you notice, spring 2002 is still after fall 2002 but it shouldn't be. STILL CONFUSED! haha

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,459
    It would be. Your lookup formula returns the words rather than the numeric values so is not different to sorting on your existing column A values.

  8. #8
    Registered User
    Join Date
    06-04-2008
    Posts
    16
    sorry, i copied and pasted the wrong one. I did it with numbers and it still has issues. I don't have time to post it right now as I am working on something else but I will post what I have later. Thanks for your help I'm at least one step closer than I was

+ 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. Sorting Multiple Columns Issue
    By gibsoneagle05 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-26-2008, 12:11 AM
  2. big sorting issue
    By iknownothing in forum Excel General
    Replies: 2
    Last Post: 03-28-2007, 04:34 PM
  3. sorting issue
    By gfrantsen1961 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-06-2007, 08:33 AM
  4. Date sorting issue
    By ngoladd in forum Excel General
    Replies: 1
    Last Post: 01-10-2007, 03:01 PM
  5. sorting issue
    By associates in forum Excel General
    Replies: 2
    Last Post: 10-26-2006, 03:08 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