Rolling sum with array formula in Google Sheets
问题 I have the dataset below. Col1 is given data and Col2 is the rolling sum of the previous 5 rows of Col1 (inclusive). Date Col1 Col2 01/04/20 2 2 02/04/20 1 3 03/04/20 4 7 04/04/20 7 05/04/20 7 06/04/20 5 10 07/04/20 2 11 08/04/20 7 09/04/20 7 10/04/20 1 8 11/04/20 3 12/04/20 1 13/04/20 1 14/04/20 1 15/04/20 1 1 Is there a way to use arrayformula to do this rather than inputting a sum formula into every cell in Col2 going down? I had a similar question using count and was given this solution: