How to Delete All Rows Below a Certain Row in Excel: 6 Methods

Method 1 – Use of Delete Option in Context Menu to Delete Rows

Steps:

  • Select the Cell B11.
  • Press CTRL+SHIFT++.
  • The cells of the last three rows will be selected.

Use of Delete Option to Delete All Rows Below a Certain Row

  • Right-click and select the Delete option from the Context Menu.

Delete option in excel

  • Select Entire row and press OK.

delete dialog box

  • The unwanted rows below a certain will be deleted.

delete row output


Method 2 – Delete Sheet Rows Option to Delete Rows Below a Certain Row

Steps:

  • Select the 3 rows with the help of the mouse.
  • Go to the Home Tab.
  • In the Cells dropdown, select Delete dropdown.
  • Click on the Delete Sheet Rows option.

Delete Sheet Rows Option for Deleting All Rows Below a Certain Row

  • Remove the rows below a particular row for Jacket 3.

Delete Sheet Rows Option Final Output


Method 3 – Utilize Name Box in Excel to Delete Rows

Steps:

  • Select the Name Box area.
  • Type the range of rows you want to delete. The range is 11:13.

Using Name Box to Delete All Rows Below a Certain Row

  • Select the undesired rows automatically.
  • Follow the second step of Method-1 or Method-2.
  • You can delete all of the rows below the row for Jacket 3.

Use of name box in excel


Method 4 – Apply Excel VBA Code to Remove Rows

Steps:

  • Go to Developer Tab>>Visual Basic Option.
  • Visual Basic Editor will open up.
  • Go to Insert Tab>>Module Option.
  • Module 1 will be created.

Using VBA Code to Delete All Rows below a Certain Row

  • Write the following code here.
Sub RemoveRowsBelow()
'delete all rows below certain row
Worksheets("VBA").Rows(11 & ":" & Worksheets("VBA").Rows.Count).Delete
End Sub

VBA code to Delete All Rows Below a Certain Row

  • VBA is the sheet name and 11 refers to from which row you want to delete the rest of the rows.
  • Press F5.
  • Get the following table where you can remove the undesired rows.

VBA output to delete rows


Method 5 – Delete All Rows Below the Last Active Row by Keyboard Shortcuts

Steps:

  • Select the cell from where you want to remove the rows.

Deleting All Rows below the Last Active Row in Excel

  • Press CTRL+SHIFT+.
  • Press CTRL+SHIFT+.

Use of keyboard shortcuts to select rows

  • All of the unused cells will be selected.
  • Right-click on your mouse.
  • Select Hide Option.

hide option from context menu

  • Hide all of the rows below the data table as follows.

Deleting All Rows below the Last Active Row Output


Method 6 – Remove Rows Below the Last Active Row with Excel VBA

Steps:

  • Follow Step-01 of Method-4.
  • Write the following code.
Sub Rmvall()
    Rows(ActiveCell.Row & ":" & Rows.Count).Delete
End Sub

Deleting All Rows below the Last Active Row with a VBA Code

  • ActiveCell.Row will return the row number of active rows and Rows.Count will count the rows in Excel and return the bottom-most row number and these two numbers will be the range for ROWS.
  • Select the row from where you want to delete rows.

Use of vba to in excel

  • Go to the Macros Option.
  • Select  Rmvall as the Macro name (the name used for the VBA code).
  • Press Run.

vba dialog box

  • Get the following result.

VBA Code Output to Delete rows


Download Workbook


You May Also Like to Read


<< Go Back to Delete Rows | Rows in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Tanjima Hossain
Tanjima Hossain

TANJIMA HOSSAIN is a marine engineer who enjoys working with Excel and VBA programming. For her, programming is a handy, time-saving tool for managing data, files, and online tasks. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. She holds a B.Sc. in Naval Architecture & Marine Engineering from BUET and is now a content developer. In this role, she creates tech-focused content centred around Excel and VBA. Apart from... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo