LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default custom sort

Hi,
XL2003
I was hoping someone could shed some light on this for me.
In the following code, notice that I had to use "n+1" to make it work when
sorting, but just n to delete the custom list.
When I look at the custom list in Tools,Options, I see:

NEW LIST
Mon, Tue, Wed, etc
Monday, Tuesday, Wednesday, etc
Jan, Feb, Mar, etc
January, February, March, etc

For some reason, when actually using the custom list,
XL seems to be counting the "NEW LIST" as number 1, but not so when deleting
or when getting the custom list number.

Application.AddCustomList Array("T", "B", "E")
n = Application.GetCustomListNum(Array("T", "B", "E"))

Range(z).Sort _
Key1:=Range("C2"), Header:=xlNo, OrderCustom:=n + 1

Application.DeleteCustomList n

Is there a way to sort, according to a custom list, without actually
creating an official custom list?
I tried:
Range(z).Sort _
Key1:=Range("C2"), Header:=xlNo, OrderCustomArray("T", "B", "E")
but it gave an error.

Regards - Dave.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom sort by vba SteveDB1 Excel Programming 4 January 13th 09 09:10 PM
Custom Sort lincservices Excel Worksheet Functions 1 June 10th 08 05:06 PM
Custom Sort Steve Stanley Excel Discussion (Misc queries) 1 February 26th 07 09:39 PM
Custom Sort Rafi Excel Programming 3 March 4th 06 08:44 PM
Excel sort by Fill Color by custom list sort Dash4Cash Excel Discussion (Misc queries) 2 July 29th 05 10:45 PM


All times are GMT +1. The time now is 08:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"