G
Guest
Hi All
Below is the code for a sort Macro works OK no problem - the question is
that on the sheet there are 20 blocks of 4 line ranges all in the same
columns. How would I incorporate them in this little macro. Ranges are as
follows C2
5, C6
9, C10
13, C14
17 as so on down to ranges C54
57
Sub Macro8()
Sheets("Lindop").Select
Range("C2
5").Select
ActiveWorkbook.Worksheets("Lindop").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Lindop").Sort.SortFields.Add
Key:=Range("D22
25") _
, SortOn:=xlSortOnValues, Order:=xlDescending,
DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Lindop").Sort
.SetRange Range("C2
5")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Below is the code for a sort Macro works OK no problem - the question is
that on the sheet there are 20 blocks of 4 line ranges all in the same
columns. How would I incorporate them in this little macro. Ranges are as
follows C2





Sub Macro8()
Sheets("Lindop").Select
Range("C2

ActiveWorkbook.Worksheets("Lindop").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Lindop").Sort.SortFields.Add
Key:=Range("D22

, SortOn:=xlSortOnValues, Order:=xlDescending,
DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Lindop").Sort
.SetRange Range("C2

.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub