Clear formatting in cells

How to clear formatting in cells using the Excel and VBA methods

METHOD 1. Clear formatting in cells

EXCEL

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

1. Select the cells for which you want to clear the formatting.
Note: in this example we are removing the formats in range (A1:B2).
Select cells in which to clear formatting

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

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

METHOD 1. Clear formatting in cells using VBA

VBA

Sub Clear_formatting_in_cells()
'Clear all formats in range ("A1:B2") in the Analysis worksheet

Worksheets("Analysis").Range("A1:B2").ClearFormats

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 formats in range ("A1:B2"), therefore if you are using the exact VBA code the cells in which you want to clear the formatting 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 ("A1:B2") in the VBA code to any range in the worksheet that contains the cells in which you want to remove the formatting.
Worksheet Selection: Select the worksheet that contains the cells in which you want to remove the formatting by changing the Analysis worksheet name, in the VBA code, to any worksheet in the workbook.

Explanation about how to clear formatting in cells

EXPLANATION

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

Excel Methods: Using Excel you can clear the formatting in selected cells with the ribbon option.

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