#1   Report Post  
Posted to microsoft.public.excel.newusers
bsoldner
 
Posts: n/a
Default Sorting

I need to sort a column in desending order so the first number is 121, 120,
etc. down to 1. Some numbers have an alpha (68a, 68b) but I still want them
in the correct order. Right now the cell formating is "general." How do I
accomplish? Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.newusers
David McRitchie
 
Posts: n/a
Default Sorting

The answer you get is not likely to be better than your description.
So all I can say is see if this solves your question.

Create a helper column to extract the digits, and sort on that as
a descending number. Then sort on the original column which is
text in ascending or descending order depending on if
68a is to come before 68b or 68b is to be before 68a (In the
correct order doesn't quite work for me.

Install the the following User Defined Funciton using instructions in
if you are not familiar with installing macros and User Defined Functions.
http://www.mvps.org/dmcritchie/excel....htm#havemacro

The following macro is explained at
http://www.mvps.org/dmcritchie/excel/sorting.htm#VAL


Function CellValue(c) As Double
'John Walkenbach 2001-04-25
' misc returns number part
CellValue = Val(c)
End Function

B1: =Cellvalue(A1)
or if installed in your personal.xls workbook
B1: =personal.xls!CellValue(A1)



---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"bsoldner" wrote in message ...
I need to sort a column in desending order so the first number is 121, 120,
etc. down to 1. Some numbers have an alpha (68a, 68b) but I still want them
in the correct order. Right now the cell formating is "general." How do I
accomplish? Thanks!



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
Advice sought: Multiple column sorting davidm Excel Worksheet Functions 3 July 29th 05 02:06 PM
Sorting 1, 1A, 2, 2A, 3, 4, 4A, 4B . . . agc1234 Excel Discussion (Misc queries) 6 May 26th 05 08:02 PM
sorting number in ascending order Janice Lee via OfficeKB.com Excel Discussion (Misc queries) 2 April 8th 05 10:31 PM


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

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"