Hi,
I have a worksheet which is always the same number of columns A:R but the number of rows varies.
I want to sort from row 2 to the row above the last row on the worksheet.
Which I can do using this -
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=ActiveCell.Offset(0, 1).Range("A1"), Order1:= _
xlAscending, Key2:=ActiveCell, Order2:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal, DataOption2:=xlSortNormal
This is another piece of code which I was wondering whether it could be adapted to do the above?
Dim Lr1 As Long
Dim lngCol As Long
Dim lngLast As Long
Lr1 = Range("A2" & Rows.Count).End(xlUp).Row
With Range("A2:R" & Lr1)
With Selection.Font
.Name = "Tahoma"
.Size = 10
End With
Many Thanks
Bookmarks