Skip to content
Advertisement

Google-Sheets counting cells based on strike through (and background color)

This is a follow up to :

Get the sum of values based on their background color – Google Sheets

I needed a slight modification :

-just count cells, not entries

-don’t count a cell if it was struck-out

This was my attempt which doesn’t work :

JavaScript

I also was trying to see what I was actually putting in that array, but where does the Logger go to as nothing shows in the console window (Edge, F12, select console).

Advertisement

Answer

You are very close.

In the forEach() method you must use only the i index:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement