Consulting

Results 1 to 7 of 7

Thread: Custom Sort

  1. #1

    Custom Sort

    Hi all,

    I have a query table with a month sorted 1,2,3,4.....12

    Is there a way I can sort by 7,8,9,10,11,12,1,2,3,4,5,6

    Thank you

  2. #2
    VBAX Tutor
    Joined
    Jan 2008
    Posts
    266
    Location
    i dont think you can make excel do it, but since its only 12 lines/columns we are talking about it shouldnt be so hard to make a own sortengine.

  3. #3
    VBAX Mentor
    Joined
    Oct 2007
    Posts
    372
    Location
    Or hide a column with relative numbers in that columns ie put your current months in b1 ,b 2, ... b12 : 7 , 8, 6 respectively and in a1, a2, a12 put 1, 2, 12 and just set your sort to that column. and hide it.

  4. #4
    Quote Originally Posted by grichey
    Or hide a column with relative numbers in that columns ie put your current months in b1 ,b 2, ... b12 : 7 , 8, 6 respectively and in a1, a2, a12 put 1, 2, 12 and just set your sort to that column. and hide it.
    That's what I did for now. I thought there might be something in excel or VBA that could be possible.

    Thank you for the inputs

  5. #5
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    You could use Excel Options to define a custom List 7,8,9,10,11,12,1,2,3,4,5,6

    and then tell Excel's Sort to use that order

  6. #6
    Quote Originally Posted by mikerickson
    You could use Excel Options to define a custom List 7,8,9,10,11,12,1,2,3,4,5,6

    and then tell Excel's Sort to use that order
    And how do I that exactly?

  7. #7
    Quote Originally Posted by ThaNguyen
    And how do I that exactly?
    Never mind figured it out.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •