|
发表于 2015-3-22 07:45
|
显示全部楼层
本楼为最佳答案
- Sub 记号()
- Dim d, i&, n&
- Set d = CreateObject("scripting.dictionary")
- [a:a].Interior.ColorIndex = xlNone
- n = Range("a65536").End(xlUp).Row
- With CreateObject("VBscript.regexp")
- .Global = True
- .Pattern = "\d{10}"
- For i = 2 To n
- For Each m In .Execute(Cells(i, 2))
- d("'" & m) = ""
- Next
- Next
- End With
- For i = 2 To n
- If d.exists("'" & Cells(i, 1).Value) Then
- Cells(i, 1).Interior.ColorIndex = 5
- End If
- Next
- [d:d] = ""
- [d2].Resize(d.Count) = Application.Transpose(d.keys)
- End Sub
复制代码 |
|