I am stuck with Cumulative total of an array which is a part of Bigger formula.
I have the following
Since it is an part of array, I want the cumulative total to be in array.
I have the following
Book11.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Total Sales | Category | 0 | a | ||||
2 | 1,99,000.00 | 1.00 | 59,700.00 | 59,700.00 | Current | Want this to be | ||
3 | 3,00,000.00 | 1.00 | 49,600.00 | -10,100.00 | 1,01,000.00 | 101000 | ||
4 | 1,99,000.00 | 1.00 | 1,02,866.67 | 53,266.67 | 3,00,000.00 | 4,01,000.00 | ||
5 | 1,99,000.00 | 1.00 | 1,42,666.67 | 39,800.00 | 37,50,000.00 | 41,51,000.00 | ||
6 | 1,99,000.00 | 1.00 | 1,82,466.67 | 39,800.00 | ||||
7 | 1,99,000.00 | 1.00 | 2,22,266.67 | 39,800.00 | ||||
8 | ||||||||
9 | ||||||||
10 | Slab | Category 1 | Category 2 | |||||
11 | 1 | 0.3 | 0.4 | |||||
12 | 90001 | 0.2 | 0.3 | |||||
13 | 150001 | 0.2 | 0.2 | |||||
14 | 900001 | 0.2 | 0.2 | |||||
Sheet1 (3) |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C2:C7 | C2 | =SUM($D$1:D2) |
D2:D7 | D2 | =SUM(IFERROR(LET(a,(($A$12:$A$14-$A$11:$A$13)-IF(($A$12:$A$14-$A$11:$A$13)+IF((C1-($A$12:$A$14-1))>0,0,(C1-($A$12:$A$14-1)))<0,0,($A$12:$A$14-$A$11:$A$13)+IF((C1-($A$12:$A$14-1))>0,0,(C1-($A$12:$A$14-1)))))/CHOOSE(B2,$B$11:$B$13,$C$11:$C$13),b,IFERROR(MATCH(A2,a,1),0)+1,c,IFERROR(MATCH(A2,a,1),0),d,INDEX(a,SEQUENCE(b),1),e,IFERROR(INDEX(a,SEQUENCE(c),1),0),f,INDEX(CHOOSE(B2,$B$11:$B$13,$C$11:$C$13),SEQUENCE(b)),IF(A2>d,d,A2-SUM(e))*f),0)) |
E3:E5 | E3 | =(($A$12:$A$14-$A$11:$A$13)-IF(($A$12:$A$14-$A$11:$A$13)+IF((C2-($A$12:$A$14-1))>0,0,(C2-($A$12:$A$14-1)))<0,0,($A$12:$A$14-$A$11:$A$13)+IF((C2-($A$12:$A$14-1))>0,0,(C2-($A$12:$A$14-1)))))/CHOOSE(B3,$B$11:$B$13,$C$11:$C$13) |
F4 | F4 | =E4+F3 |
F5 | F5 | =F4+E5 |
Dynamic array formulas. |
Since it is an part of array, I want the cumulative total to be in array.