Looping thru columns
Not tested
Dim i As Long
Range("A1:IR2000").Copy
Range("A11000").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
For i = 3 To 256
Application.CutCopyMode = False
Cells(11001, i).Resize(1999).Sort Key1:=Range("C11001"), _
Order1:=xlAscending, _
Header:=xlNo, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next i
--
HTH
Bob Phillips
"Robert" wrote in message
...
Seek assistance to convert the following macro code to loop the sorting
from
col c thru col IV.
Range("A1:IR2000").Select
Selection.Copy
Application.Goto Reference:="R11000C1"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("C11001:C12999").Select
Application.CutCopyMode = False
Selection.Sort Key1:=Range("C11001"), Order1:=xlAscending,
Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("D11001:D12999").Select
Selection.Sort Key1:=Range("D11001"), Order1:=xlAscending,
Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Thank you.
RobertR
|