Counting Cells With A Specific Color

  • Thread starter Thread starter gaspard.jouandon
  • Start date Start date
gaspard,

That formula is dependent on a custom function that Chip
created so that you could have a formula to count either
text or background colors.

You have to copy and paste Chip's function into a regular
VBA module for the formula to be able to work.

In the formula:
=COUNTBYCOLOR(A1:A10,3,FALSE)
It will return a count of the number of cells within
A1:A10 that have a color index of 3 (Red)
If you were to change the False to True, it would look at
the text color as opposed to the background color.

John
 
Back
Top