Formulas

Occasional Visitor

Is there a formula to use to delete a certain number of rows without highlighting all of the rows that you want to delete? i.e. I would like to delete rows 2 thru 70,000 on a spreadsheet. Thank you!

2 Replies

@Thomas_Sheridan 

A formula cannot do that, but a macro can:

 

Sub DeleteRows()
    Range("A2:A70000").EntireRow.Delete
End Sub

@Thomas_Sheridan As a variant, type 2:70000 in the name box. Press Enter. Rows 2 to 70000 will be selected. Right-click anywhere inside the selected range and choose Delete.

Screenshot 2021-02-06 at 11.24.42.png