VBA – ClearFormats – Remove Formatting For Each Cell In Range

Associated Files Download Links

When formatting a cell in excel using VBA you may want to make sure you are starting with a clean slate, or removing any possible formatting already on a cell. You can do this by using ClearFormats.

Clear Formats From a Range of Cells

This will clear formats for a range of cells.

If you are working with a large range, you could also loop through each cell to prevent Excel from freezing.

Loop through Cells and Clear Formats

The following example will eliminate the formatting for each cell in a range using a loop:

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!

alt text

Learn More!

<<Return to VBA Examples

Did you find this VBA tutorial useful? Then share it with your friends and colleagues:

You may also like some of this related content...

We have already gone over what variables and constants are, in our VBA Data Types
Test if Selection is a Range If you are working with a user selected Range
Union - Join Multiple Ranges You might want to combine or join multiple ranges if
Delete all Named Ranges From a Workbook To delete all Named Ranges in a Workbook,
Conditional Formatting - Highlight Duplicates To highlight all duplicate values in a range you will
Automate Excel
Left Menu Icon