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
Solved

Remove formatting without losing formulas or grouping in Excel

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

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…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

856 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