#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Custom List


Hi,
XL2003
Is it possible to sort by a custom list, and have that custom list included
in the code, rather than putting the custom list in the ToolsOptionsCustom
Lists?
Something like the following (which generates an error):

Range(Cells(A, 1), Cells(500, 16)).Sort _
Key1:=Range("DueHeader"), Order1:=xlAscending, _
Header:=xlYes, OrderCustom:=("SMT","PCB","FA")

Regards - Dave.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Custom List


One way, without code

Put your custom list in cells somewhere and name as (say) myList
For testing, your items in col-A and assuming the first item to sort is in
A2
=MATCH(A2,myList,0)
and copy down

Sort against the match'd column

Regards,
Peter T


"Dave" wrote in message
...
Hi,
XL2003
Is it possible to sort by a custom list, and have that custom list
included
in the code, rather than putting the custom list in the
ToolsOptionsCustom
Lists?
Something like the following (which generates an error):

Range(Cells(A, 1), Cells(500, 16)).Sort _
Key1:=Range("DueHeader"), Order1:=xlAscending, _
Header:=xlYes, OrderCustom:=("SMT","PCB","FA")

Regards - Dave.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Custom List


Hi Peter,
Thanks for the suggestion. But I really want to be able to do this with a
button click.
I have data that I need to be able to sort in a number of different ways,
depending on what we want at the time. I have buttons to sort by date, by
Customer, by Product, and a few others, and I'd like to have a button for the
affore mentioned.
I've tried adding the custom list, but that's only garranteed to work on 1
computer, since we can't predict how many custom lists exist on other
computers, and hence can't predict which number of custom list to call.
Regards - Dave.

"Peter T" wrote:

One way, without code

Put your custom list in cells somewhere and name as (say) myList
For testing, your items in col-A and assuming the first item to sort is in
A2
=MATCH(A2,myList,0)
and copy down

Sort against the match'd column

Regards,
Peter T


"Dave" wrote in message
...
Hi,
XL2003
Is it possible to sort by a custom list, and have that custom list
included
in the code, rather than putting the custom list in the
ToolsOptionsCustom
Lists?
Something like the following (which generates an error):

Range(Cells(A, 1), Cells(500, 16)).Sort _
Key1:=Range("DueHeader"), Order1:=xlAscending, _
Header:=xlYes, OrderCustom:=("SMT","PCB","FA")

Regards - Dave.




Reply
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 List Bob[_75_] Excel Programming 1 December 22nd 07 01:40 PM
Adding custom list and text boxes to the custom tool bar from Excel C API Mousam Excel Discussion (Misc queries) 0 August 7th 07 09:19 AM
Adding custom list and text boxes to the custom tool bar from Excel C API Mousam Excel Programming 0 August 6th 07 10:05 AM
Custom List Connie Martin Excel Discussion (Misc queries) 12 January 25th 07 09:21 PM
Can you sort a list based on catagory names without useing a custom list? BobbyFlanigan Excel Programming 2 July 29th 04 02:49 AM


All times are GMT +1. The time now is 04:29 PM.

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

About Us

"It's about Microsoft Excel"