I was able to use a sort code to sort by custodian first and then the above code worked. Thanks for the help!
FYI - this came from another thread i started to sort data..thanks Paul Hossler for the code help!
Option ExplicitSub SortByColG()
Dim rBroker As Range, rArea As Range, rSort As Range
Set rBroker = ActiveSheet.Columns(1).SpecialCells(xlCellTypeConstants, 23)
For Each rArea In rBroker.Areas
Set rSort = rArea.CurrentRegion
'adjust for header row and custodian row
If rSort.Rows(1).Row = 1 Then
'header row + total row + single data row = 3 rows so no need to sort
If rSort.Rows.Count <= 3 Then GoTo NextArea
Set rSort = rSort.Cells(3, 1).Resize(rSort.Rows.Count - 2, rSort.Columns.Count)
Else
'NO header row + total row + single data row = 2 rows so no need to sort
If rSort.Rows.Count <= 2 Then GoTo NextArea
Set rSort = rSort.Cells(2, 1).Resize(rSort.Rows.Count - 1, rSort.Columns.Count)
End If
With ActiveSheet.Sort
.SortFields.Clear
.SortFields.Add Key:=rSort.Columns(7), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.SetRange rSort
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
NextArea:
Next
Range("A1").Select
End Sub