Sub s()
t = [M1]
c = Array(0, 3, 14, 6, 33)
Dim k(9 To 12)
For i = 1 To 4
k(i + 8) = Mid(t, i, 1)
Next
Set d = CreateObject("scripting.dictionary")
For i = 4 To 66
For j = 9 To 12
If Cells(i, j) = "" Then GoTo 1
d(InStr(Cells(i, j), k(j))) = ""
Next
Cells(i, 13) = d.Count
Cells(i, 13).Interior.ColorIndex = c(d.Count)
1:
d.RemoveAll
Next
End Sub来自:求助得到的回答
温馨提示:答案为网友推荐,仅供参考