Thanks I found it in the WEB site. Do you happen to know how to change it in to a formula? This formula =COUNTBYCOLOR(A1:A10,3,FALSE) gives me a result of $NAME?
Or can you decipher this
Function CountByColor(InRange As Range, WhatColorIndex As
Integer, Optional OfText As Boolean = False) As Lon
' This function return the number of cells in InRange with
' a background color, or if OfText is True a font color,
' equal to WhatColorIndex
Dim Rng As Rang
Application.Volatile Tru
For Each Rng In InRange.Cell
If OfText = True The
CountByColor = CountByColor - _
(Rng.Font.ColorIndex = WhatColorIndex
Els
CountByColor = CountByColor - _
(Rng.Interior.ColorIndex = WhatColorIndex
End I
Next Rn
End Function