For this question, I've created a Google Apps Script function, that calculates the cumulative sum of a range. Martin Hawksey on Google+ made a comment about a more efficient way of calculating the cumulative sum:
function cumulativeSum(array){
var output = [];
for (i in array){
if(i==0) {
if (array[i].length > 1) throw ("Only single column of data");
output.push([array[i][0]]);
} else {
output.push([output[i-1][0] + array[i][0]]);
}
}
return output;
}
My question is: can this be achieved with the usage of formula's?
