excelexcel-formularolling-sum

Dynamic rolling sum in excel


How can I calculate the rolling sum of a column based on another column?

Example:

Input data are the first 3 columns in the below table. The result column that I am trying to get is highlighted in green. I want to get the dynamic sum of 'Daily sales' based on the corresponding 'No of days' given.

enter image description here


Solution

  • This formula worked. Add the 'OFFSET' function inside the 'SUM' function to input the dynamic array.

    enter image description here