Delete a row

How to delete a single row in a worksheet using Excel, VBA and Shortcut methods

METHOD 1. Delete a row by selecting an entire row

EXCEL

Select an entire row > Right-click anywhere on the selected row > Click Delete

1. Select an entire row where you want to delete a row.
Note: in the example we are deleting the second row. To select an entire row, either click on the row number or select the first cell of the row, press and hold the Ctrl and Shift keys and press the Right key.
Select entire row

2. Right-click anywhere on the selected row and click Delete. Right-click anywhere on the selected row and click Delete

METHOD 2. Delete a row using the ribbon option

EXCEL

Select a cell in the same row that you want to delete > Home tab > Cells group > Delete > Delete Sheet Rows

1. Select any cell in the same row that you want to delete.
Note: in this example row 2 will be deleted, given we have selected a cell in the second row.
Select a cell in the same row where you want to delete a row

2. Select the Home tab. Select Home tab - Excel

3. Click Delete in the Cells group.
4. Click Delete Sheet Rows.
Click Delete and click Delete Sheet Rows

METHOD 3. Delete a row using the cell option

EXCEL

Right-click on a cell in the same row that you want to delete > DeleteEntire row > OK

1. Right-click on any cell in the same row that you want to delete.
2. Click Delete
Note: in this example row 2 will be deleted, given we have right-clicked on a cell in the second row.
Right click on a cell and select Delete

3. Select the Entire row option and click OK group. Select Entire row and click OK

METHOD 1. Delete a row using VBA by selecting a single cell

VBA

Sub Delete_a_Row()
'delete row 2
Worksheets("Sheet1").Range("A2").EntireRow.Delete

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.

ADJUSTABLE PARAMETERS
Row Selection: Select the row that you want to delete by changing the row number reference ("A2"). You can also change the column reference to any column as this will have no impact on where the row will be deleted.
Worksheet Selection: Select the worksheet where you want to delete a row by changing the Sheet1 worksheet name.

METHOD 2. Delete a row using VBA by selecting a range of cells

VBA

Sub Delete_a_Row()
'delete row 2
Worksheets("Sheet1").Range("A2:D2").EntireRow.Delete

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.

ADJUSTABLE PARAMETERS
Row Selection: Select the row that you want to delete by changing the row number reference ("A2:D2"). You can also change the column reference to any column as this will have no impact on where the row will be deleted.
Worksheet Selection: Select the worksheet where you want to delete a row by changing the Sheet1 worksheet name.

METHOD 3. Delete a row using VBA by selecting an entire row

VBA

Sub Delete_a_Row()
'delete row 2
Worksheets("Sheet1").Range("2:2").EntireRow.Delete

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.

ADJUSTABLE PARAMETERS
Row Selection: Select the row that you want to delete by changing the row number reference ("2:2").
Worksheet Selection: Select the worksheet where you want to delete a row by changing the Sheet1 worksheet name.

Delete a row using a Shortcut

SHORTCUT

WINDOWS SHORTCUT

Ctrl
-

NOTES
To delete a row using this shortcut method you will need to select an entire row and then action the shortcut. If you select a single cell or a range of cells and action this shortcut a Delete dialog box will appear and you will need to select Entire row and click OK.

Explanation about how to delete a row

EXPLANATION

EXPLANATION
This tutorial explains and provides step by step instructions on how to delete a single row in a worksheet using Excel, VBA and Shortcut methods.

Excel Methods: Using Excel you can delete a row by selecting an entire row or a single cell and using a ribbon or cell option.

VBA Methods: Using VBA you can delete a row by referencing to a single cell, a range of cells or an entire row. If you want to delete a single row by referencing to a range of cells you need to ensure that the range of cells only references to a single row. As per the example in this tutorial the VBA code references to only row 2 across multiple columns ("A2:D2").

Shortcut Methods: Using a Shortcut you can delete a row by selecting an entire row that you want to delete and then actioning the shortcut.

ADDITIONAL NOTES
Note 1: Deleting a row will move the existing rows that are below the deleted row upward. In this this tutorial every row below row 2 will be moved up.