I want to get the purchase price of goods sold on the basis of FIFO .
Example of Data
I have tried but not able to get Quantity
Hope someone could help
Example of Data
I have tried but not able to get Quantity
New Microsoft Excel Worksheet.xlsx | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | |||
3 | Item | Quantity Purchased | Rate | Cumulative Total | ||||||||||
4 | Part 1 | 10 | 100 | 10 | ||||||||||
5 | Part 1 | 10 | 110 | 20 | ||||||||||
6 | 20 | 120 | 40 | |||||||||||
7 | 10 | 130 | 50 | |||||||||||
8 | ||||||||||||||
9 | ||||||||||||||
10 | ||||||||||||||
11 | Quantity Sold | Sale Price | Cumulative Quantity | Fifo Based Purchase Price | ||||||||||
12 | 11 | 11 | ||||||||||||
13 | 31 | 115 | 42 | #DIV/0! | 10 | |||||||||
14 | 9 | 10 | ||||||||||||
15 | 29 | 20 | ||||||||||||
16 | 39 | 10 | ||||||||||||
17 | ||||||||||||||
18 | ||||||||||||||
19 | ||||||||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E4:E7 | E4 | =SUMPRODUCT($C$3:C4) |
E12:E13 | E12 | =SUM($C$11:C12) |
G13:G16 | G13 | =1/(1/(IF($E$4:$E$7-E12<=0,0,$E$4:$E$7-E12))) |
J13:J16 | J13 | =INDEX($C$4:$C$7,ROW(INDIRECT("1:"&AGGREGATE(15,6,1/(1/(NOT(C13>=IF($E$4:$E$7-E12<=0,0,$E$4:$E$7-E12))*(ROW($E$4:$E$7)-ROW($E$4)+1))),1)))) |
Dynamic array formulas. |
Hope someone could help