Sorting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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/getstarted.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)
 
Back
Top