I am trying to auto sort by Ascending order in the name column of this table. I currently have a formula set up in that column. The code I have written is working but it is putting the Blanks at the top (I am assuming its because they have formulas in them). Is there a way I can have it sort in Ascending order and leave the blanks at the bottom? (Current code below)
VBA Code:
Sub SortRosterA()
Dim RA As Worksheet
Set RA = ThisWorkbook.Sheets("Shift Roster T-A 1 3")
' Unprotect sheet
RA.Unprotect
' Not Allow screen to update
Application.ScreenUpdating = False
' Auto Sort
With RA.ListObjects("DirectA").Sort
.SortFields.Clear
.SortFields.Add Key:=Range("DirectA[Name]"), Order:=xlAscending
.Apply
End With
End Sub