I want to count number of occurrence of a word in the excel in green color. For Example my excel is looks like this :-
I want to calculate occurrence of Green (X) and Red (X).
I want to count number of occurrence of a word in the excel in green color. For Example my excel is looks like this :-
I want to calculate occurrence of Green (X) and Red (X).
You will need VBA / a user defined function.
Following this tutorial:
First of all open your worksheet where you need to add the cells based on background colors.
Next, press ALT + F11 to open the VB Editor. Navigate to ‘Insert’ > ‘Module’.
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.
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.