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?
Cumulative Sum without Script
google spreadsheets;google apps script
Yes:=ArrayFormula(SUMIF(ROW(A1:A10);<=&ROW(A1:A10);A1:A10))The numbers in the green circle are the ones being summed, the ArrayFormula is populating all the others based on the cell it was pasted into, in this example I pasted in A11, B1, and C1 to show its effect.This spreadsheet that I made a while ago attempts to explain how MMULT can be used for these sort of problems, and it also demonstrates the SUMIF solution on one of the sheets, which can (and probably should) be used for special cases like the one in this question.