VBA: Remove Formatting For Each Cell In Range
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.
The following example will eliminate the formatting for each cell in a range using a loop:
Public Sub RemoveFormatting()
Dim c As Range
For Each c In Range("A:A")
c.ClearFormats
Next c
End Sub
Leave a comment
| Trackback

