Parton wonders if there is a way to convert conditional formatting into absolute formatting. He would like to be able to 'fix' the formatting in a worksheet in a way similar to how Paste Values can be used to 'fix' the values of cells.
There is no way to do this in Excel. (It would be especially great if you could do it using a Paste Special option, as Parton notes.) You can, however, use some macros to do the trick. The macros are not trivial, however, as VBA doesn't give you a whole lot of help in dealing with conditional formatting. For a good idea of what is involved, you may want to refer to this page on Chip Pearson's website:
http://www.cpearson.com/excel/CFColors.htm
There is another thing you can try, as well, that involves saving your workbook in a different format. Try these general steps:
In the process of saving the Excel workbook in HTML format, the program "strips" all the conditional formatting and makes it explicit (absolute). You should be aware, however, that this process also does the same with your formulas, saving everything as a value, instead. Even so, this may work for your needs if the tradeoff is acceptable.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13721) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Need to conditionally highlight an entire row based on the contents of a single cell in each row? This tip explains how ...
Discover MoreYou may use Excel to track due dates for a variety of purposes. As a due date approaches, you may want that fact drawn to ...
Discover MoreConditional formatting can be used to draw your attention to certain cells based on what is within those cells. This tip ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2020-07-02 05:33:32
Yazan
The way I do it is a bit simpler .
I copy the range and paste it into powerpoint maintaining source formatting. Then I copy the range again from powerpoint to Excel.
This works just fine with minor drawbacks; sometimes font size will change.
It's a workaround, but ti works :)
2020-01-24 04:31:19
Gerhard Seljehammer
Hi,
ASAP Utilities, which I highly recommend, has solved that (and many other challenges in Excel) with: "Range » Replace conditional formatting with static formatting in selection".
2020-01-06 17:20:49
Tomek
To carry the second solution a step further, I think it would be possible to do the HTML trick creating a new version of the original file (with a new name), then copy and paste special - formulas from the original worksheet to the new one. You could also paste special - column widths and/or formulas and number formats, and possibly comments. It is a bit of extra work, but would overcome the trade-off mentioned in the tip.
If you need to do this often you could record a macro that does all the work, then modify it to use with different file names (if you are proficient with macros).
2020-01-05 02:33:30
Peter McNab
I do this on a regular basis when extracting sheets from a spreadsheet containing conditional formatting. In my case, I am only interested in the font colour and background colour. Once the extracted sheets are manipulated and the primary workbook is closed, the conditions no longer apply. So before that I run a macro that checks each cell, similar to the following, using the DisplayFormat property. This does take a little while even for a small spreadsheet (my real case does other stuff in the loop), but it may be quicker than the html procedure.
' determine a range of interest
Set rSelect = Range("a1")
Set rSelect = Range(rSelect, rSelect.SpecialCells(xlLastCell))
' check all cells in range
For Each cc In rSelect
With cc
If .FormatConditions.Count > 0 Then
' use conditionally formatted foreground and background colour
.Interior.Color = .DisplayFormat.Interior.Color
.Font.Color = .DisplayFormat.Font.Color
End If
End With
Next cc
2020-01-04 22:15:26
Max Zimmerman
Would it not be simpler to select the page/copy open a new tab and paste formulas? Delete the old tab if no longer needed.
2020-01-04 12:06:44
Jim
For those who might be looking for a "i don't need to know how it works, just need to get it done" solution - ASAP Utilities <https://www.asap-utilities.com/> has a tool that will do this.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2021 Sharon Parq Associates, Inc.
Comments