How do I calculate number of colored cells?
Select your range and this will display the number of cells without color:
Sub ColorMeElmo()
Dim r As Range, Kount As Long
Kount = 0
For Each r In Selection
If r.Interior.ColorIndex = xlNone Then
Kount = Kount + 1
End If
Next
MsgBox Kount
End Sub
--
Gary''s Student - gsnu200909
"Rui" wrote:
Hi to master gurus in excel,
I really need your help to solve one issue: how to calculate number of
collor cells?
For instance, from cells range A2:F2 (6 cells),if there are 2 cells filled
in any colors, the counter in cell G2 should be equal to 4(6-2).
Any thoughts?
--
Thanks in advance!
|