|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub test()
Dim arr, x, c, i
arr = Sheet1.Range("n1").CurrentRegion.Value
With Sheet1.Range("c1")
For j = 1 To UBound(arr, 2)
For i = 1 To UBound(arr)
x = InStr(.Value, arr(i, j))
If x Then
c = Len(arr(i, j))
With Sheet1.Range("c1").Characters(Start:=x, Length:=c).Font
.Color = -16776961
.Bold = True
End With
End If
Next i
Next
End With
MsgBox "核对完成!"
End Sub
Sub 恢复颜色()
With Sheet1.Range("c1").Font
.ColorIndex = xlAutomatic
.Bold = False
End With
End Sub |
评分
-
1
查看全部评分
-
|