change color of conditional formatting into real colors

john_cash

New Member
Joined
Jul 30, 2019
Messages
23
Hi to all.
I have a range of cells with conditional formatting.
Is it possible to remove it and leave the color of the cells?
On the net i found this macro but i can't try it i have excel 2007 and i think it works for excel 2007 higher

VBA Code:
Sub remove_color_formatting()

    Dim cell
    
    For Each cell In ActiveWorkbook.ActiveSheet.Range("A5:P15").Cells
        cell.Interior.Color = cell.DisplayFormat.Interior.Color
        cell.FormatConditions.Delete
    Next
    
End Sub
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Please provide links to all sites where you have asked this question.
 
Upvote 0
Cross-posted yet again without links.
You MUST supply links to EVERY site you ask the question on.
 
Upvote 0
Sorry for the forum link
 
Upvote 0

Forum statistics

Threads
1,215,061
Messages
6,122,921
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top