This macro changes both the strike through and the Font color to Red. I only want the strike through to be in Red and the font color to remain black.
![]()
Sub changestrikethroughtoRed() Dim X As Long Dim cel As Range Dim ch As Font Dim vst, vun Range("C4:c50").Select For Each cel In Selection X = FntFormat(cel.Font) If X = 0 Then For i = 1 To Len(cel) cel.Characters(i, 1).Font.ColorIndex = _ FntFormat(cel.Characters(i, 1).Font) Next Else cel.Font.ColorIndex = X End If Next End Sub Function FntFormat(fnt As Font) As Long Dim v1, v2 Dim X As Long v1 = fnt.Strikethrough v2 = (fnt.Underline <> xlUnderlineStyleNone) If IsNull(v1) Or IsNull(v2) Then X = 0 Else X = xlAutomatic If v1 Then X = 3 If v2 Then If X > 0 Then X = 13 Else X = 5 End If End If FntFormat = X End Function
Thanks!
Bookmarks