Clear contents in cells

How to clear contents in cells using the Excel, VBA and Shortcut methods

METHOD 1. Clear contents in cells using the ribbon option

EXCEL

Select cells > Right-click on any selected cell > Click Clear Contents

1. Select the cells for which you want to clear the contents.
2. Right-click on any of the selected cells.
2. Click Clear Contents.
Note: in this example we are removing the contents in range (A2:B5).
Selects cells, right-click on any selected cell and select Clear Contents

METHOD 2. Clear contents in cells using cell option

EXCEL

Select cells > Home tab > Editing group > Click Clear > Click Clear Contents

1. Select the cells for which you want to clear the contents.
Note: in this example we are removing the contents in range (A2:B5).
Select cells in which to clear contents

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

3. Click Clear in the Editing group.
4. Click Clear Contents.
Select Clear Contents

METHOD 1. Clear contents in cells using VBA

VBA

Sub Clear_contents_in_cells()
'Clear all contents in range ("A2:B5") in the Analysis worksheet

Worksheets("Analysis").Range("A2:B5").ClearContents

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Cells to clear: This VBA code clears all of the contents in range ("A2:B5"), therefore if you are using the exact VBA code the cells in which you want to clear the contents need to be captured in this range.
Worksheet Name: Have a worksheet named Analysis.

ADJUSTABLE PARAMETERS
Cells to clear: Select the range of cells that you want to clear by changing the range ("A2:B5") in the VBA code to any range in the worksheet that contains the cells in which you want to remove the contents.
Worksheet Selection: Select the worksheet that contains the cells in which you want to remove the contents by changing the Analysis worksheet name, in the VBA code, to any worksheet in the workbook.

Clear contents in cells using a Shortcut

SHORTCUT

WINDOWS SHORTCUT

Delete

NOTES
You need to select the cells in which you want to clear the contents and then action the shortcut.

Explanation about how to clear contents in cells

EXPLANATION

EXPLANATION
This tutorial explains and provides step by step instructions on how to clear all contents in cells using the Excel, VBA and Shortcut methods.

Excel Methods: Using Excel you can clear the contents in selected cells with the ribbon option or a cell option.

VBA Methods: Using VBA you can clear the contents in a range that has been specified in the VBA code.

Shortcut Methods: Using a Shortcut you can instantly clear contents in selected cells.