Hello,
I've created a test Macro to delete rows from an Excel Table. However, considering the number of rows change after each import, I'm trying to figure out how to delete Row #3 all the way down to the end of the Table... leaving the Total row alone when applicable.
The Macro shows multiple entries for deleting rows(2) over and over again.
Is there a way to tell it to go to the end instead of repeating?
Note: I'm just beginning to play with VBA code...
I've created a test Macro to delete rows from an Excel Table. However, considering the number of rows change after each import, I'm trying to figure out how to delete Row #3 all the way down to the end of the Table... leaving the Total row alone when applicable.
The Macro shows multiple entries for deleting rows(2) over and over again.
VBA Code:
Range("D3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ListObject.ListRows(2).Delete
Selection.ListObject.ListRows(2).Delete
Selection.ListObject.ListRows(2).Delete
Selection.ListObject.ListRows(2).Delete
Selection.ListObject.ListRows(2).Delete
Selection.ListObject.ListRows(2).Delete
Selection.ListObject.ListRows(2).Delete
Selection.ListObject.ListRows(2).Delete
Is there a way to tell it to go to the end instead of repeating?
Note: I'm just beginning to play with VBA code...