Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Excel 2002: How to sort text with different lenght ?

You could turn your Different Length strings into Same Length strings
by means of a formula like this in a helper column:

=LEFT(A1,2)&TEXT(RIGHT(A1,LEN(A1)-2),"0000")

and copy down as needed. Alternatively, you could just extract the
number part into a helper column with this:

=VALUE(RIGHT(A1,LEN(A1)-2))

and copy this down.

Either way, you then use the helper column as the sort key.

Hope this helps.

Pete


On Jul 16, 2:34 pm, Mr. Low wrote:
Dear Sir,

I find that Excel 2002 could sort alphanumeric references of the same length
very well but not the references with different number of character as
illustrated below.

Same Length Different Length
(No problem in sorting) (Unable to sort in this sequence)
FG0001 FG1
FG0012 FG12
FG0241 FG241
FG6806 FG6806

For references with different number of character, Excel could only group
the same item together but not in ascending or descending order.

Is there anyway for it to sort in sequence?

Thanks

Low

--
A36B58K641



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 505
Default Excel 2002: How to sort text with different lenght ?

Dear Sir,

Thanks for your helpful information.


Best Regards

Low

--
A36B58K641


"Pete_UK" wrote:

You could turn your Different Length strings into Same Length strings
by means of a formula like this in a helper column:

=LEFT(A1,2)&TEXT(RIGHT(A1,LEN(A1)-2),"0000")

and copy down as needed. Alternatively, you could just extract the
number part into a helper column with this:

=VALUE(RIGHT(A1,LEN(A1)-2))

and copy this down.

Either way, you then use the helper column as the sort key.

Hope this helps.

Pete


On Jul 16, 2:34 pm, Mr. Low wrote:
Dear Sir,

I find that Excel 2002 could sort alphanumeric references of the same length
very well but not the references with different number of character as
illustrated below.

Same Length Different Length
(No problem in sorting) (Unable to sort in this sequence)
FG0001 FG1
FG0012 FG12
FG0241 FG241
FG6806 FG6806

For references with different number of character, Excel could only group
the same item together but not in ascending or descending order.

Is there anyway for it to sort in sequence?

Thanks

Low

--
A36B58K641




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2002: How to add extension to text ? Mr. Low Excel Discussion (Misc queries) 4 March 3rd 07 02:26 PM
repeating text Excel 2002 Paper Pusher Excel Discussion (Misc queries) 0 October 5th 06 04:42 PM
Outlook 2002 calendar dates exported to Excel 2002 sort incorrectl scampbell Excel Worksheet Functions 0 February 22nd 06 06:31 PM
Sort by date in Excel 2002? Betty Excel Discussion (Misc queries) 1 June 2nd 05 07:55 PM
Excel 2002 Will Not Print Text Boxes Mark Excel Discussion (Misc queries) 3 April 16th 05 12:03 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"