ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sorting a worksheet with weird conditions (https://www.excelbanter.com/excel-programming/417686-sorting-worksheet-weird-conditions.html)

RyanH

Sorting a worksheet with weird conditions
 
I have a worksheet that I would like to do an untraditional sort. Col. L
contains the Status of each product, Col. M contains each products ship date,
Col. A contains each products Item #. Each cell in Col.L may contain one of
these words: "Archive", "Ready", "Complete", "On Time", "Late", or "". I
want to sort in this order:

Sort Col. L: "Archive", "Ready", "Complete", "On Time", "Late", then ""
Sort Col. M: xlAscending
Sort Col. A: xlAscending

How can I do this? I was thinking I may a need a hidden helper column next
to Col.L which would help with this sort, but was wondering if there is
another way.

How is the OrderCustom arguement used in Sort? The help section is very
vague.

Thanks in Advance!
--
Cheers,
Ryan

joel

Sorting a worksheet with weird conditions
 
Add this formula to an auxilary column, copy formula down the new column, and
then sort on the new column instead of L

=MATCH(L1,{"Archive","Ready","Complete","On Time","Late"},0)

"RyanH" wrote:

I have a worksheet that I would like to do an untraditional sort. Col. L
contains the Status of each product, Col. M contains each products ship date,
Col. A contains each products Item #. Each cell in Col.L may contain one of
these words: "Archive", "Ready", "Complete", "On Time", "Late", or "". I
want to sort in this order:

Sort Col. L: "Archive", "Ready", "Complete", "On Time", "Late", then ""
Sort Col. M: xlAscending
Sort Col. A: xlAscending

How can I do this? I was thinking I may a need a hidden helper column next
to Col.L which would help with this sort, but was wondering if there is
another way.

How is the OrderCustom arguement used in Sort? The help section is very
vague.

Thanks in Advance!
--
Cheers,
Ryan


RyanH

Sorting a worksheet with weird conditions
 
I assumed I would have to do that.

Are you fimilar what the OrderCustom arguement in the Sort method?
--
Cheers,
Ryan


"Joel" wrote:

Add this formula to an auxilary column, copy formula down the new column, and
then sort on the new column instead of L

=MATCH(L1,{"Archive","Ready","Complete","On Time","Late"},0)

"RyanH" wrote:

I have a worksheet that I would like to do an untraditional sort. Col. L
contains the Status of each product, Col. M contains each products ship date,
Col. A contains each products Item #. Each cell in Col.L may contain one of
these words: "Archive", "Ready", "Complete", "On Time", "Late", or "". I
want to sort in this order:

Sort Col. L: "Archive", "Ready", "Complete", "On Time", "Late", then ""
Sort Col. M: xlAscending
Sort Col. A: xlAscending

How can I do this? I was thinking I may a need a hidden helper column next
to Col.L which would help with this sort, but was wondering if there is
another way.

How is the OrderCustom arguement used in Sort? The help section is very
vague.

Thanks in Advance!
--
Cheers,
Ryan



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

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