| 
    
     |  | 123 さん、こんばんわ。 
 >1行目は対象外、2行目が項目名で、3行目以降 最後の行(lastrow)までを
 >昇順にいたいのです。対象の列は icol です。
 
 3行目以降を対象としてソートすればいいです(タイトル行は無しで)。
 
 Sub test()
 Dim lastrow As Long, lastcol As Integer, icol As Integer
 '↓暫定的に指定
 icol = 3 'C列でソートする例
 '表示しているシートの使用範囲全体をソートする。
 With ActiveSheet
 With .UsedRange
 lastrow = .Cells(.Count).Row
 lastcol = .Cells(.Count).Column
 End With
 '
 If lastrow > 3 and lastcol >= icol Then
 With .Range(.Cells(3, 1), .Cells(lastrow, lastcol))
 .Sort Key1:=.Parent.Cells(3, icol), _
 Order1:=xlAscending, _
 Header:=xlNo, _
 SortMethod:=xlCodePage
 End With
 End If
 End With
 End Sub
 
 こんな感じです。
 Sortメソッドの引数の詳細についてはヘルプで確認してください。
 
 |  |