Sub test2()
With Worksheets(1).Range("a1:w100")
Set c = .Find(.Font.Strikethrough, LookIn:=xlValues)
If Not c Is Nothing Then
firstaddress = c.Address
Do
c.Font.Color = rgbRed
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstaddress
End If
End With
End Sub作者: joblyc017 時間: 2017-8-23 15:59
若是其中一字有刪除線就反紅,可參考如下
Sub test0()
Dim c As Range, x As Long, S%
For Each c In Range("a1:k30") 'Range("o4:w181")
S = 0
For x = Len(c.Value) To 1 Step -1
If c.Characters(x, 1).Font.Strikethrough Then S = S + 1
Next
If S > 0 Then
c.Interior.Color = rgbRed
Else
c.Interior.Color = rgbWhite
End If
Next
End Sub作者: 蒼雪 時間: 2017-8-31 21:48