Conditional format >> regular format

py1ro

Board Regular
Joined
Sep 30, 2005
Messages
70
I´m looking for VBA code which would transform conditional format of a cell into regular format, such as Italic, color, etc.

This is because I determine the conditional format of a cell based on the contents of another cell, but later on I loose that other cell, but would like to keep the format.

Thanks for any help
Rolf
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
It will depend on the conditional formats, but this get you headed in the right direction:

Sub macro()
With ActiveCell
.Interior.ColorIndex = .FormatConditions(1).Font.ColorIndex
End With
Selection.FormatConditions.Delete
End Sub
 
Upvote 0
Thanks Tactps

I tried your suggestion and it transfers from conditional to regular format allright, but it does so regardless wether the conditions were met or not. What I need is for the transfer to happen only when conditions had been met.
 
Upvote 0
I eventually solved the problem by implementing it with VBA code and not using the Excel conditional formatting at all.
 
Upvote 0

Forum statistics

Threads
1,214,914
Messages
6,122,211
Members
449,074
Latest member
cancansova

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