Sub 大于3标红()
Dim rng As Range, cell As Range
Dim str1 As String, str2 As String
Dim i As Long, j As Long, lenCommon As Long
For Each rng In Selection.Columns
If rng.Column < Selection.Columns(Selection.Columns.Count).Column Then
For Each cell In rng.Cells
If cell.Value <> "" And cell.Offset(0, 1).Value <> "" Then
str1 = cell.Value: str2 = cell.Offset(0, 1).Value
For i = 1 To Len(str1) - 2
For j = 1 To Len(str2) - 2
If Mid(str1, i, 3) = Mid(str2, j, 3) Then
lenCommon = 3
cell.Characters(i, lenCommon).Font.Color = RGB(255, 0, 0)
cell.Offset(0, 1).Characters(j, lenCommon).Font.Color = RGB(255, 0, 0)
End If
Next j
Next i