ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sort with custom list (https://www.excelbanter.com/excel-worksheet-functions/191149-sort-custom-list.html)

annoni

sort with custom list
 
I don't want to make cusom list containing all items in the list. Is there a
way using two cumston lists in one sort - i.e. fruit and color...and have
result as below...

grape
cherry
melon
apple_red
apple_green
apple_yellow
pear_red
pear_green
pear_yellow
tomato_red
tomato_green
tomato_yellow

Please help and thanks!

Ron Rosenfeld

sort with custom list
 
On Fri, 13 Jun 2008 07:12:17 -0700, annoni
wrote:

I don't want to make cusom list containing all items in the list. Is there a
way using two cumston lists in one sort - i.e. fruit and color...and have
result as below...

grape
cherry
melon
apple_red
apple_green
apple_yellow
pear_red
pear_green
pear_yellow
tomato_red
tomato_green
tomato_yellow

Please help and thanks!


Since your desired results are not in alphabetical order, by either fruit or
color, I believe you will need a custom list.

If you could set up some rules for sorting, you could generate a sort code
using a formula in one or more hidden columns, and then sort on that column.
--ron

annoni

sort with custom list
 
To clarify my question...

Is there a way to sort data using two cusom lists...for example

using custom list 1

grape
cherry
melon
apple
pear
tomato

and custom list 2

red
green
yellow

to get result below

grape
cherry
melon
apple_red
apple_green
apple_yellow
pear_red
pear_green
pear_yellow
tomato_red
tomato_green
tomato_yellow


Thanks.


Ron Rosenfeld

sort with custom list
 
On Fri, 13 Jun 2008 08:21:02 -0700, annoni
wrote:

To clarify my question...

Is there a way to sort data using two cusom lists...for example

using custom list 1

grape
cherry
melon
apple
pear
tomato

and custom list 2

red
green
yellow

to get result below

grape
cherry
melon
apple_red
apple_green
apple_yellow
pear_red
pear_green
pear_yellow
tomato_red
tomato_green
tomato_yellow


Thanks.


Yes.

Assume your data is in A2:A13

Enter the following formulas:

B2: =LEFT(A2,FIND("_",A2&"_")-1)
C2: =MID(A2,1+FIND("_",A2&"_"),63)

Fill B2:C2 down to row 13.

Select some cell in the table, or A2:C13

Data/Sort
Sort by: Column B
Sort On: Values
Order: Custom list = grape, cherry, etc.

Sort by: Column A
Sort On: Vaues
Order: Custom List = red, green, yellow

Hide columnns B&C
--ron

annoni

sort with custom list
 
Where is "Sort On: Values" option?..cannot find it.


"Ron Rosenfeld" wrote:

On Fri, 13 Jun 2008 08:21:02 -0700, annoni
wrote:

To clarify my question...

Is there a way to sort data using two cusom lists...for example

using custom list 1

grape
cherry
melon
apple
pear
tomato

and custom list 2

red
green
yellow

to get result below

grape
cherry
melon
apple_red
apple_green
apple_yellow
pear_red
pear_green
pear_yellow
tomato_red
tomato_green
tomato_yellow


Thanks.


Yes.

Assume your data is in A2:A13

Enter the following formulas:

B2: =LEFT(A2,FIND("_",A2&"_")-1)
C2: =MID(A2,1+FIND("_",A2&"_"),63)

Fill B2:C2 down to row 13.

Select some cell in the table, or A2:C13

Data/Sort
Sort by: Column B
Sort On: Values
Order: Custom list = grape, cherry, etc.

Sort by: Column A
Sort On: Vaues
Order: Custom List = red, green, yellow

Hide columnns B&C
--ron


Ron Rosenfeld

sort with custom list
 
On Fri, 13 Jun 2008 10:22:01 -0700, annoni
wrote:

Where is "Sort On: Values" option?..cannot find it.


Look at the Sort dialog box. Perhaps in your version there may not be a values
option. But you should still be able to sort on the columns I wrote using your
custom list.

But
--ron


All times are GMT +1. The time now is 09:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com