As Luke said - there are several ways.
1) UDF:
Function CountIntColor(MyColor As Range, MySumRange As Range)
Application.Volatile
IntCol = MyColor.Interior.ColorIndex
For Each CL In MySumRange
If CL.Interior.ColorIndex = IntCol Then
Counter = Counter + 1
End If
Next
CountIntColor = Counter
End Function
===========
The first argument is the range of colored cells to be counted.
The second argument will refere to a single cell colored with YELLOW.
***************************************
2) Using the CELL function. Look it up in Excels Help
3) In Excel "2007"/"2010" - you can filter by Cell Interior color and count
the visible cells with SUBTOTAL function.
Micky