I am getting started with Google App Scripts and have written a little something.
The problem I am having is the following: ReferenceError: "COUNT" is not defined
I am getting this too when I try to use COUNTA
or any other build in function of the Google App Script.
I am uncertain weather or not my script will work but testing it would be much easier if I was able to execute it.
For reference I have the script in question here:
function fillMonthFromChildSheet()
{
var sheet = SpreadsheetApp.getActiveSheet();
var dates = [];
var dateCell;
var totalExpense = 0;
var rangeB = "B:B";
for (var i = 0; i < COUNT(rangeB) - COUNTBLANK(rangeB); ++i)
{
dateCell = "B" + i;
dates.push(DATE(dateCell));
}
for (var i = 0; i < dates.length(); ++i)
{
if (MONTH(dates[i]) == MONTH(TODAY()))
{
var range = "A" + i;
totalExpense += sheet.getRange(range).getValue();
}
}
return totalExpense;
}
Help is much appreciated! Thank you in advance