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
我发现只有这样:
使用 vba,运行这个子: