excel count cells by color code example
Example 1: excel sheet cell color formula
//create this function on a script on sheets
function GetCellColorCode(input)
{
var ss = SpreadsheetApp.getActiveSpreadsheet();
var cell = ss.getRange(input);
var result = cell.getBackground();
return result
}
...
// then use this code inside cell
=GetCellColorCode("A"&ROW())
...
// result will be the color in hex
> #fffff
Example 2: excel count columns with text
=COUNTIF(B4:B8,"*")