ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do i sort by numerical prefix ? 1423 would come before 850 (https://www.excelbanter.com/excel-worksheet-functions/53938-how-do-i-sort-numerical-prefix-1423-would-come-before-850-a.html)

Stuck in Africa help me please

how do i sort by numerical prefix ? 1423 would come before 850
 
Help me I need to sort a table by numerical Prefix , For example if I hade
the following 4 numbers 85,444454, 11111, 99 they should sort as
11111,444454,85,99

I have a 2002 hp excel program

Thanks

Gilles Desjardins

how do i sort by numerical prefix ? 1423 would come before 850
 
Type them in with an apostrophe '11111 '444454 In other words use them as
text
HTh

Gilles
"Stuck in Africa help me please" <Stuck in Africa help me
wrote in message
...
Help me I need to sort a table by numerical Prefix , For example if I
hade
the following 4 numbers 85,444454, 11111, 99 they should sort as
11111,444454,85,99

I have a 2002 hp excel program

Thanks




Karthik

how do i sort by numerical prefix ? 1423 would come before 850
 
I just tried and got the result you wanted. Put the numbers to be sorted in
column A and in column B, write the formula =left(A1,1) and copy it to the
entire range.

Then sort by column B first and then by column A. Once you say OK, you will
get a warning. Select the radio button against the option

Sort numbers and numbers stored as text separately.

And voila! You should get what you want. Hope it works

Karthik


"Stuck in Africa help me please" wrote:

Help me I need to sort a table by numerical Prefix , For example if I hade
the following 4 numbers 85,444454, 11111, 99 they should sort as
11111,444454,85,99

I have a 2002 hp excel program

Thanks


Bob Phillips

how do i sort by numerical prefix ? 1423 would come before 850
 
You could also add a helper column with a formula of

=A1&REPT("0",10-LEN(A1))

copy down, and sort by the helper column.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuck in Africa help me please" <Stuck in Africa help me
wrote in message
...
Help me I need to sort a table by numerical Prefix , For example if I

hade
the following 4 numbers 85,444454, 11111, 99 they should sort as
11111,444454,85,99

I have a 2002 hp excel program

Thanks





All times are GMT +1. The time now is 05:06 PM.

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