Solved

Remove formatting without losing formulas or grouping in Excel

Posted on 2012-03-30
4
273 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now