Home » excel » excel – How do I delete ONLY the formatting of a range of cells… that is, leave the content in tact

excel – How do I delete ONLY the formatting of a range of cells… that is, leave the content in tact

Posted by: admin April 23, 2020 Leave a comment

Questions:

I am trying to remove the color from cells, but not the data in the cells.
I have tried these 2 methods:

Sheets("Output").Range("B3:ka200").Clear
Sheets("Output").Range("B3:ka200").ClearContents

but both delete data as well. I Need a method which will retain the data and delete the formatting.

How to&Answers:

Try

Sheets("Output").Range("B3:ka200").ClearFormats

Please note above will remove all formatting

Answer:

Range("A1:C4").Interior.ColorIndex = xlNone

This will remove the cell background color.