Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel - special sort
Hi,
i have different rows, where there are just special values allowed. for example: one | two | three if i sort the row, i can just say to sort it ascending one-three-two or descending two-three-one but i'd like to get one-two-three How can i realize this problem (in each row, there a a mximum of 10 different names to sort)? Thanks, Thomas |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel - special sort
Thomas,
Create a custom list with three elements (Tools menu, Options, Custom Lists) and then in the Sort dialog, choose Options and select this list. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Thomas" wrote in message om... Hi, i have different rows, where there are just special values allowed. for example: one | two | three if i sort the row, i can just say to sort it ascending one-three-two or descending two-three-one but i'd like to get one-two-three How can i realize this problem (in each row, there a a mximum of 10 different names to sort)? Thanks, Thomas |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel - special sort
Hi Thomas!
is it possible for you to translate the one - two and three into a new column with numbers and sort it from that column? Torstein "Thomas" skrev i melding om... Hi, i have different rows, where there are just special values allowed. for example: one | two | three if i sort the row, i can just say to sort it ascending one-three-two or descending two-three-one but i'd like to get one-two-three How can i realize this problem (in each row, there a a mximum of 10 different names to sort)? Thanks, Thomas |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel - special sort
add a table with all your text values in the first column
and its corresponding decimal in a second column on your sheet, add a column to the right of your list then add a VLOOKUP formula, then sort the list based off the this new column. In the sub below I assume a column starts at G1 but is of indeterminate length. I have elsewhere on another sheet a range called MyTable which is a column of words and a column of numbers. The words on my worksheet in G1 are in this list. The code inserts a new column, ads the formula, sorts the list then deletes the inserted column...leaving your list of words sorted as per the values in MyTable Sub SortList() Dim Target As Range Set Target = Range(Range("G1"), Range("G1").End (xlDown)) Dim cl As Long cl = Target.Column + 1 Columns(cl).Insert With Target.Offset(0, 1) .FormulaR1C1 = "=VLookup(RC[-1],MyTable,2,False)" End With With Target.Resize(Target.Rows.Count, 2) .Sort Target.Offset(0, 1), xlAscending End With Columns(cl).Delete End Sub Patrick Molloy Microsoft Excel MVP -----Original Message----- Hi, i have different rows, where there are just special values allowed. for example: one | two | three if i sort the row, i can just say to sort it ascending one-three-two or descending two-three-one but i'd like to get one-two- three How can i realize this problem (in each row, there a a mximum of 10 different names to sort)? Thanks, Thomas . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Special Sort Help | Excel Discussion (Misc queries) | |||
Special sort for oldest and newest date | Excel Discussion (Misc queries) | |||
3 level sort, last special order | Excel Worksheet Functions | |||
Excel sort by Fill Color by custom list sort | Excel Discussion (Misc queries) | |||
Zip code sort is an Excel problem even when using the special cat. | Excel Discussion (Misc queries) |