Solved

Remove formatting without losing formulas or grouping in Excel

Posted on 2012-03-30
4
279 Views
Last Modified: 2012-03-30
Hello,

Is there a way to remove all cell formatting in a worksheet in Excel 2010 without affecting any formulas or outlining (grouping)?

For example, I know that you can Copy/PasteValue all cells in a worksheet to a new worksheet and it will remove all the formatting. But it also eliminates formulas as well as grouping and ungrouping.

I am looking for a way to preserve the formulas and grouping but lose the formatting.

Thanks
0
Comment
Question by:Steve_Brady
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 12

Accepted Solution

by:
kgerb earned 500 total points
ID: 37789027
Hello Steve,
Home tab, Editing group, Clear dropdown, Clear Formats.

Formulas will be preserved as well as grouping.

Kyle
0
 
LVL 12

Expert Comment

by:kgerb
ID: 37789100
I think by "grouping" you meant cell borders.  If so, the following macro will remove all (or most) cell formats except the cell borders.  It will also leave the formulas alone.  If you need assistance with the implementation please let me know.
Sub RemoveFormatsExceptBorders()
With Selection
     'Remove cell colors
    .Interior.ColorIndex = xlNone
     'Remove all special font properties and formatting
    With .Font
        .Size = 11
        .Bold = False
        .Italic = False
        .FontStyle = "Regular"
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
    End With
End With
End Sub

Open in new window

Kyle
0
 

Author Comment

by:Steve_Brady
ID: 37789397
>>>kgerb
Home tab, Editing group, Clear dropdown, Clear Formats.


Thanks Kyle.  I've never even noticed that drop-down before but I sure will be using it a lot from now on.  And your first response was the correct one (i.e. grouping was not referring to cell borders but to grouping rows and/or columns: Data tab > Group or Ungroup).

Thanks again.
0
 
LVL 12

Expert Comment

by:kgerb
ID: 37789528
You're welcome.  Glad to help.
Kyle
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question