|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Option Explicit
Sub TEST6()
Dim ar, i&, j&, k&, dic As Object
Application.ScreenUpdating = False
Set dic = CreateObject("Scripting.Dictionary")
With [A1].CurrentRegion
ar = .Value
.Font.Color = 0
For i = 1 To UBound(ar)
dic.RemoveAll
For j = 1 To Len(ar(i, 1))
dic(Mid(ar(i, 1), j, 1)) = Empty
Next j
For j = 2 To UBound(ar, 2)
With .Cells(i, j)
For k = 1 To Len(.Value)
If dic.exists(Mid(.Value, k, 1)) Then
.Characters(k, 1).Font.Color = vbRed
End If
Next k
End With
Next j
Next i
End With
Set dic = Nothing
Application.ScreenUpdating = True
Beep
End Sub
|
评分
-
3
查看全部评分
-
|