macro sort
Sub Macro1()
n = Cells(Rows.Count, 3).End(xlUp).Row
Range("A1:C" & n).Select
Selection.Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
This just does the first three columns. The first line figures how far down
to go. The next lines selects the block to be sorted. The last actually
performs the sort.
--
Gary''s Student - gsnu200776
"atv" wrote:
HI there
Can anybody help me with a simple Macro to sort the sheet according to 3rd
column and the number of rows is not known. Please explain about the
important part of Macro too.
Thanks
|