Quote:
Can you not sort the data to arrange it alphabetically?
|
You didn't bother to answer that question. Perhaps you're still thinking about it.
Every record can be added to the bottom of the table then sorted into its correct location.
Here's how the macro recorder handles the sort.
Code:
Sub Macro1()
'
' Macro1 Macro
' sort by last name
'
'
Range("D2").Select
ActiveWorkbook.Worksheets("DATA").ListObjects("tDATA").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("DATA").ListObjects("tDATA").Sort.SortFields.Add Key _
:=Range("D2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("DATA").ListObjects("tDATA").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub