早之前,这个问题回答过了,是需要做一个宏函数,来统计颜色的Function
CountColor(col
As
Range,
countrange
As
Range)
As
Integer
Dim
icell
As
Range
Application.Volatile
For
Each
icell
In
countrange
If
icell.Interior.ColorIndex
=
col.Interior.ColorIndex
Then
CountColor
=
CountColor
+
1
End
If
Next
icell
End
Function