Spreadsheet: 830015d1684639946-single-let-function-to-get-sub-total-at-each-stage-sub-total
Sheet: Destination-WrongResult(Month2)

 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Allocation of Quantity month & below (excelforum.com) |  |  |  |  |  |  |  |  |  | < Helper Columns >
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Expected Answer |  |  |  |  |  | Extracted columns from Source Sheet |  |  |  |  |  | Month-1 | Month-1 | Month-2 | Month-2 | Month-3 | Month-3
 | Item |  |  |  |  |  |  |  |  |  |  | Month |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Quantity | Total |  |  |  |  |  | Item | Month | SN | Quantity | Total | Price | Quantity | Total | Quantity | Total | Quantity | Total
 | Product A |  |  |  |  |  |  |  |  |  |  | 1 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 50 |  |  |  |  |  |  |  | 0 | 0 | 0 | 0 | 0
 | Product B |  |  |  |  |  |  |  |  |  |  | 1 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 213 |  |  |  |  |  |  | Total | 0 | 0 | 0 | 0 | 0
 | Product A |  |  |  |  |  |  |  |  |  |  | 2 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 142 |  |  |  |  | < Wrong result |  | Product A | 0 | 1 | 10 | 25 | 2.5
 | Product B |  |  |  |  |  |  |  |  |  |  | 2 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 210 |  |  |  |  | < Wrong result |  | Product A | 1 | 3 | 10 | 25 | 2.5
 | Product B |  |  |  |  |  |  |  |  |  |  | 3 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 55 |  |  |  |  | < Wrong result |  | Product A | 1 | 5 | 15 | 60 | 4
 | Product A |  |  |  |  |  |  |  |  |  |  | 3 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 10 |  |  |  |  | < Wrong result |  | Product A | 1 | 7 | 17 | 70 | 4.12
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product A | 2 | 9 | 20 | 66 | 3.3
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product A | 2 | 11 | 75 | 120 | 1.6
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product A | 3 | 12 | 20 | 195 | 9.75
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product A Total | 10 | 48 | 167 | 561 | 27.77
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product B | 0 | 2 | 45 | 540 | 12
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product B | 1 | 4 | 80 | 120 | 1.5
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product B | 1 | 6 | 95 | 155 | 1.63
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product B | 2 | 10 | 45 | 197 | 4.38
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product B Total | 4 | 22 | 265 | 1012 | 19.51