I've added some progression SUM
operation with ROW
and OFFSET
for the following. Note that I have modified and added to your sample data for more thorough results.
??????
The SUM
formula in C2 is =SUM(OFFSET($A$2,0,0,MAX(INDEX((SUBTOTAL(9,OFFSET($A$2, 0,0,ROW(1:99),1))<$A$1)*ROW(1:99),,))+1,1))
anf the COUNT
is derived in D2 with =MAX(INDEX((SUBTOTAL(9,OFFSET($A$2, 0,0,ROW(1:99),1))<$A$1)*ROW(1:99),,))+1
. TBH, I didn't experiment much with zeroes in the data as I was unsure whether you would want to count them in the progression or not.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…