ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Custom Sorting (https://www.excelbanter.com/excel-discussion-misc-queries/137151-custom-sorting.html)

CathyZ

Custom Sorting
 
I have a column that has blanks, characters, numbers, number w/ text attached
and text. When I sort (selecting sort with numbers and numbers stored as text
separately) the order items are returned in is : blanks, characters, numbers
and numbers w/ text mixed together, then text. I want to be able to sort so
my numbers and numbers w/ text appear first. Please advise if possible.

For example:
Sorting: current sort
#
(this is a blank)
123
123A
HOME


Desired Sort:
123
123A (these two can be interchangeable)
#
HOME
(blank) (these bttm 3 can be interchangable)

TFTH





Bill Kuunders

Custom Sorting
 
select the whole range first and sort ascending
this will give you ,,, numbers,,,,numbers with text,,,text,,,spaces

--
Greetings from New Zealand

"CathyZ" wrote in message
...
I have a column that has blanks, characters, numbers, number w/ text
attached
and text. When I sort (selecting sort with numbers and numbers stored as
text
separately) the order items are returned in is : blanks, characters,
numbers
and numbers w/ text mixed together, then text. I want to be able to sort
so
my numbers and numbers w/ text appear first. Please advise if possible.

For example:
Sorting: current sort
#
(this is a blank)
123
123A
HOME


Desired Sort:
123
123A (these two can be interchangeable)
#
HOME
(blank) (these bttm 3 can be interchangable)

TFTH







dak

Custom Sorting
 
Could you use MID and VLOOKUP functions in the column immediately adjacent
[let's say Column A] to your column to be sorted [Column B]? In your VLOOKUP
Table Array [Columns C & D], column C would be the numbers 0 through 9, all
symbols, all letters, a blank space and 'HOME'. Column D would be the sort
order you desire, from 1 to whatever.

Then have a formula in column A =VLOOKUP(MID(column B address,1,1),name of
your VLOOKUP range,2,FALSE). If it should become important for HOME to be
next-to-last, then you could include an IF statement.

Sort by column A values, then COPY/PASTE your resorted list from column B to
wherever you need it. dak


"CathyZ" wrote:

I have a column that has blanks, characters, numbers, number w/ text attached
and text. When I sort (selecting sort with numbers and numbers stored as text
separately) the order items are returned in is : blanks, characters, numbers
and numbers w/ text mixed together, then text. I want to be able to sort so
my numbers and numbers w/ text appear first. Please advise if possible.

For example:
Sorting: current sort
#
(this is a blank)
123
123A
HOME


Desired Sort:
123
123A (these two can be interchangeable)
#
HOME
(blank) (these bttm 3 can be interchangable)

TFTH






All times are GMT +1. The time now is 03:40 AM.

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