OK Got it: I noticed that one of the fellows above used google to search. I
did the same but changed sum to count. Long story a little shorter, I ended
up at
http://www.cpearson.com/excel/colors.htm where he has some excellent
formulas and programming. I had some trouble with the syntax on the Function
but eventually got to what is below:
Function CountByColor(InRange As Range, WhatColorIndex As Integer, Optional
OfText As Boolean = False) As Long
'
' 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 Range
Application.Volatile True
For Each Rng In InRange.Cells
If OfText = True Then
CountByColor = CountByColor - _
(Rng.Font.ColorIndex = WhatColorIndex)
Else
CountByColor = CountByColor - _
(Rng.Interior.ColorIndex = WhatColorIndex)
End If
Next Rng
End Function
Thanks Mr. Pearson and ll who contributed. Much appreciated.
RD