我有以下两个用户定义的函数:
Function GetFillColor(Rng As Range) As Long
GetFillColor = Rng.Interior.ColorIndex
End Function
和
Function ContainsColor(Rng As Range, Clr As Long) As Boolean
ContainsColor = False
For Each c In Rng
If GetFillColor(c) = Clr Then
ContainsColor = True
Exit For
End If
Next
End Function
第二个函数在调用ContainsColor(A1:A5,35)时似乎不起作用,我缺少什么?感谢。
答案 0 :(得分:1)