+ Reply to Thread
Results 1 to 2 of 2

Sort Query for Pivot Data

  1. #1
    Registered User
    Join Date
    10-28-2009
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2003
    Posts
    21

    Question Sort Query for Pivot Data

    Hi All,

    I have a little sort query thats annoying the hell out of me, i have attached the sheet for you to look at.

    I have the following ranges to sort in the following order:

    <2 days
    2-5days
    6-10 days
    11-20 days
    21-30 days
    31-60 days

    But when i sort in ascending order i get the following (which is correct i know but of no help!)

    <2 days
    11-20 days
    2-5days
    21-30 days
    31-60 days
    6-10 days



    How do I get them in the correct order above? This then needs to go into a pivot table and be sorted in the ascending days, will it still hold the sort then (or is it just the same technique when its in the pivot table to sort it as it is on the sheet?)

    Yours confusingly.......
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sort Query for Pivot Data

    You can add a column in the table entering a number starting at 1 representing the sorted position you want the ranges in.

    Then add that column to the Data area of your Pivot table and sort by that column
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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