Calculate cumulative or recursive values in Google Sheets using LAMBDA and SCAN to iterate through a column while maintaining state across rows.