สำหรับคำถามนี้ฉันได้สร้างฟังก์ชัน Google Apps Script ซึ่งคำนวณผลรวมสะสมของช่วง Martin Hawkseyบน Google+ แสดงความคิดเห็นเกี่ยวกับวิธีการคำนวณผลรวมสะสมที่มีประสิทธิภาพมากขึ้น:
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;
}
คำถามของฉันคือ: สามารถทำได้ด้วยการใช้สูตรหรือไม่

