In this tutorial, we’ll be showing you how to count colored cells in Microsoft Excel.
There is no built-in method, but in Excel you can count up how many colored cells you have in a range. If you have a large dataset of colored cells, we’ll show you how to count them through VBA by creating countbycolor formula.
If you don't want to use VBA Code there are two more ways to count color cell in Excel.
Trick 01 Tutorial Link
• How to count colored cells in Excel
Trick 02 Tutorial Link
• Excel COUNTIF On Color - No VBA Required
How to Enable the Developer Tab in Excel
• How to Enable the Developer Tab in Excel f...
VBA Code:
Function CountColor(range_data As Range, criteria As Range) As Long
Dim datax As Range
Dim xcolor As Long
xcolor = criteria.Interior.ColorIndex
For Each datax In range_data
If datax.Interior.ColorIndex = xcolor Then
CountColor = CountColor + 1
End If
Next datax
End Function