How to count color cells in excel.

How to count color cells in excel.

HI All, In this video I have told about how we can create our own Excel function using VBA. Which help us to count the color cells & font color cells. We create the function by writing very short code in VBA. Below is the code which you can use:- Function Fontcolor_Countif(Rng As Range, Cell As Range) Dim cell1 As Range, K As Integer K = 0 For Each cell1 In Rng If cell1.Font.Color = Cell.Font.Color Then K = K + 1 End If Next cell1 Fontcolor_Countif = K End Function Function Cellcolor_Countif(Rng As Range, Cell As Range) Dim cell1 As Range, K As Integer K = 0 For Each cell1 In Rng If cell1.Interior.Color = Cell.Interior.Color Then K = K + 1 End If Next cell1 Cellcolor_Countif = K End Function