Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'm having trouble with the code for a macro that needs a custom sort order
for the second sort key. I have three sort keys -- the first and third are regular sorts, but the second needs to sort by custom list 6. Does anyone know how to do this? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Are you using the Excel Sort feature or does your macro include a sort
algorithm? If the later: add a table into the code like this Red 1 Blue 2 Green 3 Now use the number in the second column as a sorting proxy for the value in the first column best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Erin" wrote in message ... I'm having trouble with the code for a macro that needs a custom sort order for the second sort key. I have three sort keys -- the first and third are regular sorts, but the second needs to sort by custom list 6. Does anyone know how to do this? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
If you use xl2003 and try to do this manually, you'll see that you can only
specify the primary key for the custom sort order. You could do multiple sorts, though. One sort by the 2nd and 3rd key, then one more sort for the 1st key. Erin wrote: I'm having trouble with the code for a macro that needs a custom sort order for the second sort key. I have three sort keys -- the first and third are regular sorts, but the second needs to sort by custom list 6. Does anyone know how to do this? -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks so much -- this worked perfectly!
"Dave Peterson" wrote: If you use xl2003 and try to do this manually, you'll see that you can only specify the primary key for the custom sort order. You could do multiple sorts, though. One sort by the 2nd and 3rd key, then one more sort for the 1st key. Erin wrote: I'm having trouble with the code for a macro that needs a custom sort order for the second sort key. I have three sort keys -- the first and third are regular sorts, but the second needs to sort by custom list 6. Does anyone know how to do this? -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks for your response, but I did get it to work with the first
recommendation. "Bernard Liengme" wrote: Are you using the Excel Sort feature or does your macro include a sort algorithm? If the later: add a table into the code like this Red 1 Blue 2 Green 3 Now use the number in the second column as a sorting proxy for the value in the first column best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Erin" wrote in message ... I'm having trouble with the code for a macro that needs a custom sort order for the second sort key. I have three sort keys -- the first and third are regular sorts, but the second needs to sort by custom list 6. Does anyone know how to do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom Sort Order - Wildcard? | Excel Worksheet Functions | |||
Custom Sort Order | Excel Discussion (Misc queries) | |||
Sort sheet based on particuilar sort order | Excel Worksheet Functions | |||
Can I save a custom sort order for a specific spreadsheet? | Excel Worksheet Functions | |||
Using a macro to sort your data in alphabetical order? | Excel Discussion (Misc queries) |