|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub a()
Set d = CreateObject("scripting.dictionary")
q = 2
x = 2
For s = 1 To 15
If s > 1 Then q = q + 9 ':x=x+
arr = Sheet1.Range(Cells(7, q), Cells(300, q + 8)) '1
For i = 1 To UBound(arr)
For j = 1 To UBound(arr, 2)
If arr(i, j) <> "" Then d(arr(i, j)) = d(arr(i, j)) + 1
Next
t = d.keys
For n = 0 To UBound(t)
If d(t(n)) > 2 Then
For Each m In Sheet1.Range(Cells(i + 6, q), Cells(i + 6, q + 8)) '2
If m <> "" And m.Value = t(n) Then m.Interior.Color = 255
Next
End If
Next
d.RemoveAll
Next
Next
End Sub
|
|