Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sorting alpha-numerically?

I've got an Excel file with a column holding text data such as:

[B11], [B1], [A2], [B100], [B010], [A1] - where [] is the cell

which I want to sort as:

[A1], [A2], [B1], [B010], [B11], [B100]

Note that the leading zeroes (as in [B010], which equals [B10]) are not
required, so I could happily lose them before sorting.

Any suggestions on how to do this?



Also, some of the cells contain multiple data, as in [B2, B13, A4] which I
would ideally like to split off into new columns, or onto duplicated rows.

[Banana] [B2] [B13] [A4]

or

[Banana] [B2]
[Banana] [B13]
[Banana] [A4]

This latter problem is not so important to me at this stage, but I mention
it in case it is of interest.


--

Nigel M

If I'm discussing apples, please don't suggest bananas
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Sorting alpha-numerically?

Excel version?

In 2003, highlight the data you want to sort and go to Data Sort.
Click "Options" and choose "Sort left to right".

--JP



On Oct 14, 7:44*am, Nigel Molesworth
wrote:
I've got an Excel file with a column holding text data such as:

[B11], [B1], [A2], [B100], [B010], [A1] * - * where [] is the cell

which I want to sort as:

[A1], [A2], [B1], [B010], [B11], [B100]

Note that the leading zeroes (as in [B010], which equals [B10]) are not
required, so I could happily lose them before sorting.

Any suggestions on how to do this?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sorting alpha-numerically?


I use auxilary columns and split the B10 into two columns putting the B
in one column and the 10 in a second column and then sort on the two new
columns.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=144059

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sorting alpha-numerically?

On Wed, 14 Oct 2009 14:11:18 +0100, joel
wrote:

I use auxilary columns and split the B10 into two columns putting the B
in one column and the 10 in a second column and then sort on the two new
columns


I can see how that would work, but how would I split the data?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Sorting alpha-numerically?

This will give you the leading letters...

=LEFT(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"012345 6789"))-1)

and this will give you the trailing numbers...

=MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456 789")),99)

--
Rick (MVP - Excel)


"Nigel Molesworth" wrote in message
...
On Wed, 14 Oct 2009 14:11:18 +0100, joel
wrote:

I use auxilary columns and split the B10 into two columns putting the B
in one column and the 10 in a second column and then sort on the two new
columns


I can see how that would work, but how would I split the data?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Sorting alpha-numerically?

Hi Nigel,

=ADDRESS(ROW(INDIRECT(A1)),COLUMN(INDIRECT(A1)))
copy the result as values
text to columns using the "$" character
sort on two levels

Let me know if this helps.

Peggy

"Nigel Molesworth" wrote in message
...
On Wed, 14 Oct 2009 14:11:18 +0100, joel
wrote:

I use auxilary columns and split the B10 into two columns putting the B
in one column and the 10 in a second column and then sort on the two new
columns


I can see how that would work, but how would I split the data?


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
Spreadsheet columns are displayed numerically instead of alpha eddie Excel Worksheet Functions 5 September 11th 09 04:40 PM
Sorting rows left to right numerically Carlton A. Barlow Excel Worksheet Functions 1 December 2nd 07 12:40 AM
Sorting Numerically [email protected] Excel Worksheet Functions 1 September 28th 06 04:26 AM
Sorting Worksheets Numerically jnf40 Excel Programming 10 September 23rd 06 04:38 AM
Sorting alpha in two columns SteveC Excel Discussion (Misc queries) 2 March 24th 06 01:56 PM


All times are GMT +1. The time now is 07:54 PM.

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

About Us

"It's about Microsoft Excel"