Hi Sam,
Count the cells with same interior color as A$3
=countbycolor(A$1:A$17,cellcolorindex(A$3,0))
using the function by that name in
Chip Pearson's "Functions For Cell Colors"
http://www.cpearson.com/excel/colors.htm
since you say shaded, presume you mean shading,
so change colorindex to pattern and
rename your new function accordingly.
Recording a macro is where you can pick up some
details such as I just gave you to use .pattern
instead of colorindex
Colors work best using the color of another cell,
with a pattern you could specifically use the name
i.e. xlgray8, xlgrid, xlvertical
if that is easier.
HTH,
David McRitchie, Microsoft MVP - Excel (site changed 2000-04-15)
My Excel Macros: http://www.geocities.com/davemcritchie/excel/excel.htm
Sam <hend...@hotmail.com> wrote ...