|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
- Sub Macro1()
- Application.ScreenUpdating = False
- Set d = CreateObject("scripting.dictionary")
- For j = 1 To Cells(Rows.Count, 1).End(3).Row
- arr = Split(Cells(j, 1), " ")
- d.RemoveAll
- For i = 0 To UBound(arr)
- If Val(arr(i)) > 300 Then
- d(arr(i)) = 1 + d(arr(i))
- End If
- Next i
- If d.Count > 0 Then
- For i = 0 To d.Count - 1
- st = 1
- For l = 1 To d.items()(i)
- If InStr(st, Cells(j, 1), d.keys()(i)) > 0 Then
- With Cells(j, 1).Characters(Start:=InStr(st, Cells(j, 1), d.keys()(i)), Length:=3).Font
- .ColorIndex = 3
- End With
- st = InStr(st, Cells(j, 1), d.keys()(i)) + 1
- End If
- Next l
- Next i
- End If
- Next j
- Application.ScreenUpdating = True
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|