hi. I have table ([Table1]) which covers columns A:M (number of rows are dynamic). I have found code to delete the table rows, but I want to delete the entire sheet row, based on the table rows.
I want to delete all sheets rows in line with the table, except the first and last row (so I would be left with just the header row, the first row, and the last row).
Here's some code that would do the table rows.
For x = 1 to 5
Sheet1.ListObjects("Table1").ListRows(2).Delete
Next
I've attached a sample sheet. So in the sample, I would want to delete the entire sheet rows from 9 to 33 (this is dynamic of course) and leave just the header row (row 7), the first row (row 8), and the row called "dummy row".
Bookmarks