excel条件格式中不同数值用同一颜色表示如何设公式

2025-04-08 11:16:01
推荐回答(1个)
回答1:

早之前,这个问题回答过了,是需要做一个宏函数,来统计颜色的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