Alright, so I'm trying to repeat a function I have made in Google Sheets, called POINTS to calculate a point integer value from a cell parameter -- but sadly, there is no loop function for Sheets so far as I know.
I am now trying to code a function in Apps Script with a loop to run the POINTS function on a range of cells and sum them together; however, I cannot reference the POINTS function or any other named functions available in the actual spreadsheet like SUM or COUNTIF. Does anyone know how to import these functions over or allow the Apps Script to access them?
Here is the code I currently have for the apps script (with the POINTS function where I'd want it if it were possible):
function summing(row, startCol, endCol, function a) {
var app = SpreadsheetApp;
var ss = app.getActiveSpreadsheet();
var s = ss.getActiveSheet();
var sum = 0;
for (i = startCol; i <= endCol; i++) {
sum += POINTS(s.getRange(row, i));
}
return sum;
}
getRangein a loop is slow and inefficient.POINTSfunction?