Sub countcoloredcells()
For Each C In Range("a2:f2")
If C.Interior.ColorIndex = -4142 Then mc = mc + 1
Next C
MsgBox mc
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Rui" <(E-Mail Removed)> wrote in message
news:102253A9-4D4C-47F3-8D97-(E-Mail Removed)...
> 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!