I need to sort a table, but leave the first 2 rows out of the sort (the first row is a general header, the second is a column header)
The table's sort method appears to only allow excluding a single header row, so I am sorting using a selection:
Code:
Dim rng As Range
Dim ct As Integer
With tbl
ct = .Rows.Count
If (ct > 2) Then
Set rng = .Rows(3).Range
rng.End = .Rows(ct).Range.End
rng.Select
Call Selection.Sort(ExcludeHeader:=False, FieldNumber:=1, SortFieldType:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending)
End If
End With
Is this the best/only way to do this? I would prefer not using a selection, if that is possible.