0

I want to count number of occurrence of a word in the excel in green color. For Example my excel is looks like this :-

Snil of my excel worksheet

I want to calculate occurrence of Green (X) and Red (X).

Ulli Schmid
  • 1,167
  • 1
  • 8
  • 16

2 Answers2

2

You will need VBA / a user defined function.
Following this tutorial:

  1. First of all open your worksheet where you need to add the cells based on background colors.

  2. Next, press ALT + F11 to open the VB Editor. Navigate to ‘Insert’ > ‘Module’.

  3. After this, paste the “ColorIndex” UDF in the Editor.

Function ColorIndex(CellColor As Range)  
ColorIndex = CellColor.Interior.ColorIndex  
End Function

You can then use ColorIndex(cellReference) in your Excel sheet.

Ulli Schmid
  • 1,167
  • 1
  • 8
  • 16
1

Maybe you should change your point of view. Instead of colores "X"s, you could change the letter to "y", for example. So the COUNTIF would work.