Thread
:
Sorting a list of numbers
View Single Post
#
1
June 5th, 2010, 03:05 PM posted to microsoft.public.excel.misc
Don Guillett[_2_]
external usenet poster
Posts: 607
Sorting a list of numbers
Option Explicit
Sub SASLineEmUP()
Dim lr As Long
Dim i As Long
Dim lc As Long
Application.ScreenUpdating = False
Columns(1).Clear
lr = Cells.Find("*", Cells(Rows.Count, Columns.Count) _
, , , xlByRows, xlPrevious).Row
For i = 2 To lr
lr = Cells(Rows.Count, 1).End(xlUp).Row + 1
lc = Cells(i, Columns.Count).End(xlToLeft).Column
Cells(i, 2).Resize(, lc).Copy 'Cells(lr, 1)
Cells(lr, 1).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=True
Next i
Columns(1).Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
Application.ScreenUpdating = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Don Guillett" wrote in message news:...
sample?
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"BRB" wrote in message
...
I have inherited an excel file with numbers across 100 columns and over
300
rows with several blank cells (likely 15%). I would like to format these
numbers across 10 columns and however many rows are necessary, but
without
any blank cells, in ascending order down each column.
Can someone help me how to do this? Thank you.
Don Guillett[_2_]
View Public Profile
View message headers
Find all posts by Don Guillett[_2_]
Find all threads started by Don Guillett[_2_]