' http://www.thespreadsheetguru.com/blog/2014/6/20/the-vba-guide-to-listobject-excel-tables
Sub SwapEnds(dir As Long)
' dir=1 for First to Last
' dir=2 for Last to First
Dim ActiveTable As ListObject
Dim arrIn As Variant
Dim arrOut As Variant
Dim iIn As Long
Dim iOut As Long
Dim j As Long
'Determine if ActiveCell is inside a Table
On Error GoTo NoTableSelected
Set ActiveTable = ActiveSheet.ListObjects(ActiveCell.ListObject.Name)
On Error GoTo 0
' Move First Row to the End
With ActiveTable
arrIn = .DataBodyRange
ReDim arrOut(1 To UBound(arrIn, 1), 1 To UBound(arrIn, 2))
For iIn = 1 To UBound(arrIn, 1)
If dir = 1 Then iOut = ((UBound(arrIn, 1) + iIn - 2) Mod UBound(arrIn, 1)) + 1
If dir = 2 Then iOut = (iIn Mod UBound(arrIn, 1)) + 1
For j = 1 To UBound(arrIn, 2)
arrOut(iOut, j) = arrIn(iIn, j)
Next
Next
.DataBodyRange = arrOut
End With
Exit Sub
'Error Handling
NoTableSelected:
MsgBox "There is no Table currently selected!", vbCritical
End Sub