Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
custom sort by vba | Excel Programming | |||
Custom Sort | Excel Worksheet Functions | |||
Custom Sort | Excel Discussion (Misc queries) | |||
Custom Sort | Excel Programming | |||
Excel sort by Fill Color by custom list sort | Excel Discussion (Misc queries) |