How can I copy just the format of a cell when the format is derived by a "conditional formatting" but without copy the condition too?
1 Answer
I found only this way:
using vba, run this sub:
Sub Keep_Format()
Dim xRg As Range
Dim xTxt As String
Dim xCell As Range
On Error Resume Next
If ActiveWindow.RangeSelection.Count > 1 Then
xTxt = ActiveWindow.RangeSelection.AddressLocal
Else
xTxt = ActiveSheet.UsedRange.AddressLocal
End If
Set xRg = Application.InputBox("Select range:", "tools for Excel", xTxt, , , , , 8)
If xRg Is Nothing Then Exit Sub
For Each xCell In xRg
With xCell
.Font.FontStyle = .DisplayFormat.Font.FontStyle
.Interior.Color = .DisplayFormat.Interior.Color
.Font.Strikethrough = .DisplayFormat.Font.Strikethrough
End With
Next
xRg.FormatConditions.Delete
End Sub