I need to delete the last 7 rows from a table, but never the first 7. here is what I have to delete the last 7, just not sure about the "IF" first 7 part.
VBA Code:
Sub DeleteLast7Rows()
Dim fname As String
Dim lr As Long
' Find last row with data in column A
lr = Cells(Rows.Count, "A").End(xlUp).Row
' Delete last 7 rows of data
Rows(lr - 6 & ":" & lr).Delete
End Sub