#1   Report Post  
Posted to microsoft.public.excel.misc
BrettOlbrys
 
Posts: n/a
Default Sorting help needed!


I have a column of data in random order and when I Sort the data by
ascending order (I have hundreds of pages of these), the result is as
below:

62062
62063
62093
89120
20294 SAT
20294 WH
20309 WH
20310 BLK
20310 WH
23109 COLBALT
25013 OS
50362 BS
50362 SB
50367 BS
50368 BS
50370 BS
50370 SB
50398 BS
52030 BS
52032 BS
52106 BS FR
52133 BS
52203 BS
63204 MC/FR
87000 BLK
901 RT BS
930V/C B

I need for the data to be in numerical order (ascending) so that (for
example) the 901 RT BS is at the top of the list b/c 901 is a smaller
value then 930 and the 89120 would be the last b/c 89120 is the largest
value number, etc... and I need that to occur even if ther is text at
the end of the number.

How do you tell Excel to do this?

Thanks,

Brett


--
BrettOlbrys
------------------------------------------------------------------------
BrettOlbrys's Profile: http://www.excelforum.com/member.php...fo&userid=1786
View this thread: http://www.excelforum.com/showthread...hreadid=496583

  #2   Report Post  
Posted to microsoft.public.excel.misc
wjohnson
 
Posts: n/a
Default Sorting help needed!


Probably not the answer you want - but copy your sample to a Word
Document and it will sort as you want.
Sort Order in Word
901 RT BS
930V/C B
20294 SAT
20294 WH
20309 WH
20310 BLK
20310 WH
23109 COLBALT
25013 OS
50362 BS
50362 SB
50367 BS
50368 BS
50370 BS
50370 SB
50398 BS
52030 BS
52032 BS
52106 BS FR
52133 BS
52203 BS
62062
62063
62093
63204 MC/FR
87000 BLK
89120


--
wjohnson
------------------------------------------------------------------------
wjohnson's Profile: http://www.excelforum.com/member.php...o&userid=29640
View this thread: http://www.excelforum.com/showthread...hreadid=496583

  #3   Report Post  
Posted to microsoft.public.excel.misc
Stefi
 
Posts: n/a
Default Sorting help needed!

Are these imported data? I experienced similar problems with imported data,
e.g. converted from a .TXT file. If so, you should first transform them (e.g.
in a helper column) with the TEXT(cellreference,"@") function then sort by
the transformed column (you can copy and pastespecial-values the transformed
column back to their original place, if necessary).

Regards,
Stefi


€˛BrettOlbrys€¯ ezt Ć*rta:


I have a column of data in random order and when I Sort the data by
ascending order (I have hundreds of pages of these), the result is as
below:

62062
62063
62093
89120
20294 SAT
20294 WH
20309 WH
20310 BLK
20310 WH
23109 COLBALT
25013 OS
50362 BS
50362 SB
50367 BS
50368 BS
50370 BS
50370 SB
50398 BS
52030 BS
52032 BS
52106 BS FR
52133 BS
52203 BS
63204 MC/FR
87000 BLK
901 RT BS
930V/C B

I need for the data to be in numerical order (ascending) so that (for
example) the 901 RT BS is at the top of the list b/c 901 is a smaller
value then 930 and the 89120 would be the last b/c 89120 is the largest
value number, etc... and I need that to occur even if ther is text at
the end of the number.

How do you tell Excel to do this?

Thanks,

Brett


--
BrettOlbrys
------------------------------------------------------------------------
BrettOlbrys's Profile: http://www.excelforum.com/member.php...fo&userid=1786
View this thread: http://www.excelforum.com/showthread...hreadid=496583


  #4   Report Post  
Posted to microsoft.public.excel.misc
BrettOlbrys
 
Posts: n/a
Default Sorting help needed!


It's not feasable to sort in Word b/c I have 200+ pages like this to
sort. The data was not imported, it was typed directly into the
cells.

I simply want the data to ascend from lowest to highest just like the
Word example above, so how do you do in Excel when there is text in
there too?

Thanks,

Brett


--
BrettOlbrys
------------------------------------------------------------------------
BrettOlbrys's Profile: http://www.excelforum.com/member.php...fo&userid=1786
View this thread: http://www.excelforum.com/showthread...hreadid=496583

  #5   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default Sorting help needed!

Assume the values start in A1, in B1 put

=IF(ISERR(--A1),--LEFT(A1,MATCH(FALSE,ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1),A1)

entered with ctrl + shift & enter

(if column B or the adjacent column is not available insert a new column to
the right and put the formula there adapted to your real values)

copy down as long as needed then select both columns and sort by the help
column

--
Regards,

Peo Sjoblom

(No private emails please)


"BrettOlbrys"
wrote in message
...

It's not feasable to sort in Word b/c I have 200+ pages like this to
sort. The data was not imported, it was typed directly into the
cells.

I simply want the data to ascend from lowest to highest just like the
Word example above, so how do you do in Excel when there is text in
there too?

Thanks,

Brett


--
BrettOlbrys
------------------------------------------------------------------------
BrettOlbrys's Profile:
http://www.excelforum.com/member.php...fo&userid=1786
View this thread: http://www.excelforum.com/showthread...hreadid=496583




  #6   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default Sorting help needed!

On Wed, 28 Dec 2005 22:46:19 -0600, BrettOlbrys
wrote:


I have a column of data in random order and when I Sort the data by
ascending order (I have hundreds of pages of these), the result is as
below:

62062
62063
62093
89120
20294 SAT
20294 WH
20309 WH
20310 BLK
20310 WH
23109 COLBALT
25013 OS
50362 BS
50362 SB
50367 BS
50368 BS
50370 BS
50370 SB
50398 BS
52030 BS
52032 BS
52106 BS FR
52133 BS
52203 BS
63204 MC/FR
87000 BLK
901 RT BS
930V/C B

I need for the data to be in numerical order (ascending) so that (for
example) the 901 RT BS is at the top of the list b/c 901 is a smaller
value then 930 and the 89120 would be the last b/c 89120 is the largest
value number, etc... and I need that to occur even if ther is text at
the end of the number.

How do you tell Excel to do this?

Thanks,

Brett


Use a helper column which contains only the numeric portion, and sort on that.

For example:

With your data in A1:An

B1: =--LEFT(A1,MATCH(TRUE,ISERROR(-MID(A1,ROW(INDIRECT("1:255")),1)),0)-1)

This is an **array** formula, so after typing or pasting it into the formula
bar, hold down <ctrl<shift while hitting <enter. Excel will place braces
{...} around the formula.

Select B1 and copy/drag the formula down to Bn. This will extract the numeric
portion of the values in column A.

Select An:Bn and, from the main menu: Data/Sort Column B Ascending.




--ron
  #7   Report Post  
Posted to microsoft.public.excel.misc
BrettOlbrys
 
Posts: n/a
Default Sorting help needed!


Works great. Thank you!

Brett


--
BrettOlbrys
------------------------------------------------------------------------
BrettOlbrys's Profile: http://www.excelforum.com/member.php...fo&userid=1786
View this thread: http://www.excelforum.com/showthread...hreadid=496583

  #8   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default Sorting help needed!

On Thu, 29 Dec 2005 23:58:43 -0600, BrettOlbrys
wrote:


Works great. Thank you!

Brett


You're welcome. Glad to help.
--ron
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
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
sorting non contiguous ranges gsh20 Excel Discussion (Misc queries) 1 September 8th 05 04:50 PM
sorting number in ascending order Janice Lee via OfficeKB.com Excel Discussion (Misc queries) 2 April 8th 05 10:31 PM
SORTING question Rebecca New Users to Excel 3 February 24th 05 05:35 PM
Adding a KeyID column for sorting Rebecca New Users to Excel 3 February 20th 05 07:09 PM


All times are GMT +1. The time now is 04:02 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"