PDA

View Full Version : [SOLVED] Remove any formatting from cells



crmpicco
05-26-2005, 06:19 AM
I am looking for code that will select ALL cells in a workbook and remove any formatting that may be on these cells, i.e. Bold, Italic or sized text.

johnske
05-26-2005, 06:25 AM
Hi crmpicco,
Try this

Option Explicit

Sub ClearIt()
Dim N&
For N = 1 To Sheets.Count
Sheets(N).Activate
Cells.ClearFormats
Next N
End Sub




HTH,
John

crmpicco
05-26-2005, 06:29 AM
excellent - cheers

crmpicco
05-26-2005, 06:30 AM
Cells.ClearFormats



works great

johnske
05-26-2005, 06:34 AM
Hi, I was doing that on the fly and didn't put a loop for all sheets (corrected now) :)

crmpicco
05-26-2005, 06:56 AM
thanks