• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Advanced Sorting

C_C

New Member
Hi,

I've got a table which contains multiple items with status.
I want the items who are not yet closed are sorted on top of the list.

Column A = autonumber
Column B = Status (Open - Closed - Waiting - Rejected).
....


I would like to see to have to following result:

Sort on Column B: First Open, Waiting, last Open OR Rejected.
Next: Sort on Column A: A->Z.

I can't figure out how to add the 'OR' in my sort...
If possible I'd like to have a solution without additional columns or VBA...

I hope I explained it well enough.
Thanks in advance for your help.

C_C
 
C_C

Firstly, Welcome to the Chandoo.org Forums

I would add a helper Column which would have a simple formula like:
C2: =if(B2="Open",1,If(B2="Closed",2,3))
Copy down

Then sort by column C as the Primary field and Column A as the secondary sort
 
Hi C_C, and welcome to the forum!

W/o adding an addiiotnal column, you can't do the Or type logic that Hui as figured out. If that's not a big priority, here's how to get your sort w/o helper col or VB.

First, in some cells, write out your sorted list:
Open
Waiting
Closed
Rejected

Then, open up Excel options - Advanced - General - Edit Custom Lists.
upload_2015-4-13_10-38-23.png
Select the range of cells you just created, and hit Import
upload_2015-4-13_10-38-56.png

XL will now recognize your list of words as a sorted list. You can then sort the column on this custom list by Opening sort dialogue, and under Order, choose Custom List, and select the appropriate option.

IMO, it's better to just add the helper column. :P
 
Back
Top