I know how to delete multiple rows when it's not a Table object (i.e. just the entire row)
Sub Delete()
Rows(“1:3”).EntireRow.Delete
End Sub
I also know how to delete a single row from a Table object:
Sub Delete()
ActiveSheet.ListObjects("Table1").ListRows(1).Delete
End Sub
But I'm not sure how to delete multiple rows from a Table object. Specifically, I will always need to delete rows from 1 to some n
that the user specifies from Table1
.
I currently have it as a for-loop in my macro to achieve this, but this is painfully slow when n
is high. So if there's a simple adaptation of the above, that would be great?