
1个回答
展开全部
Sub xx()
Dim d
Set d = CreateObject("Scripting.Dictionary")
With [AF28:AO37]
n = .Count
For i = 1 To n
d(.Item(i)) = ""
Next i
End With
With [K14:T23]
n = .Count
For i = 1 To n
If d.xeists(.Item(i)) Then .Item(i).Interior.ColorIndex = 6
Next i
End With
d.RemoveAll
With [K14:T23]
n = .Count
For i = 1 To n
d(.Item(i)) = ""
Next i
End With
With [AF28:AO37]
n = .Count
For i = 1 To n
If d.xeists(.Item(i)) Then .Item(i).Interior.ColorIndex = 6
Next i
End With
End Sub
追问
If d.xeists(.Item(i)) Then .对象不支持属性或方法
追答
Sub xx()
Dim d
Set d = CreateObject("Scripting.Dictionary")
With [AF28:AO37]
n = .Count
For i = 1 To n
d(.Item(i).Text) = ""
Next i
End With
With [k14:t23]
n = .Count
For i = 1 To n
If d.exists(.Item(i).Text) Then .Item(i).Interior.ColorIndex = 6
Next i
End With
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |