• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Delete Custom Cell Styles

apesant

New Member
All-


Is there a quick way to delete all custom cell styles?


I am using excel 2010 and didn't realize that a formatting macro file I used daily custom cell styles everytime I used a keyboard shortcut. I now have hundreds of styles in each file and would like to get rid of them but deleting 1 at a time is awful.


Thanks- Andy
 
Check out this thread for 2 possible solutions.

Copied here, this macro might do it:

[pre]
Code:
Sub KillCustomStyles()
Dim mpStyle As Style
For Each mpStyle In ActiveWorkbook.Styles
If Not mpStyle.BuiltIn Then
mpStyle.Delete
End If
Next mpStyle
End Sub
[/pre]
 
You could also try this


http://www.excelfox.com/forum/f11/remove-unused-custom-styles-vba-616/?highlight=custom


which deletes only unused custom styles.


Kris
 
Back
Top