I want to count a number of specific responses from a form where the response can be left empty, zero or any other number 'd'.
The following code:
var data = sheet.getRange("B2:L").getValues();
var d = 0;
if (data[i][j] == d){
count++;
}
assumes that an empty cell == 0
is true, thus counting the wrong number of cells that actually hold the value zero
var d = 0;
if (data[i][j] != '' && data[i][j] == d){
count++;
}
or any variation with != null / != ""
does not seem to work for me
EDIT : Link to document. I think you can see the script if you make a copy.