Hello !
i have created a excel for the shares i buy. i want to use formula for AVCO (Average cost method) method.
I am attaching file for reference please if some one can help me with the formula.
Thanks in Advance.
i have created a excel for the shares i buy. i want to use formula for AVCO (Average cost method) method.
I am attaching file for reference please if some one can help me with the formula.
Stocks.xlsb | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | # | Date | Status | C.Note # | Scrip Name | Qty | T.Rate | T.Amount | C.O.G | ||
2 | 01 | 10/09/21 | Buy | 9794 | Sun Tv | 10 | 349.90 | 3,499.00 | 3,499.00 | ||
3 | 02 | 17/09/21 | Buy | 11810 | Sun Tv | 10 | 335.40 | 3,354.00 | 6,853.00 | ||
4 | 03 | 22/09/21 | Buy | 13100 | Sun Tv | 20 | 325.00 | 6,500.00 | 13,353.00 | ||
5 | 04 | 23/09/21 | Buy | 13773 | Escorts | 10 | 153.00 | 1,530.00 | 1,530.00 | ||
6 | 05 | 29/09/21 | Buy | 15139 | DLF | 10 | 159.00 | 1,590.00 | 1,590.00 | ||
7 | 06 | 29/09/21 | Sell | 15139 | Escorts | -10 | 157.00 | -1,570.00 | -1,530.00 | ||
8 | 07 | 29/09/21 | Buy | 15139 | Tata Steel | 10 | 466.00 | 4,660.00 | 4,660.00 | ||
9 | 08 | 30/09/21 | Buy | 15491 | DLF | 25 | 151.50 | 3,787.50 | 5,377.50 | ||
10 | 09 | 30/09/21 | Buy | 15491 | Escorts | 25 | 151.00 | 3,775.00 | 5,305.00 | ||
11 | 10 | 30/09/21 | Sell | 15491 | Sun Tv | -30 | 338.50 | -10,155.00 | -10,014.75 | ||
12 | 11 | 30/09/21 | Buy | 15491 | Tata Steel | 10 | 457.75 | 4,577.50 | 9,237.50 | ||
13 | 12 | 30/09/21 | Sell | 15491 | Tata Steel | -9 | 471.55 | -4,243.95 | -2,097.00 | ||
14 | Total | 81 | 213.63025 | 17,304.05 | 37,763.25 | ||||||
Transaction |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H13 | H2 | =IFERROR([@[T.Rate]]*[@Qty],"-") |
I2:I13 | I2 | =IF([@Status]="BUY", (SUMIFS([T.Amount],[Scrip Name],[@[Scrip Name]],[Status],"BUY",[Date],"<="&[@Date])), (SUMIFS([T.Amount],[Scrip Name],[@[Scrip Name]],[Status],"BUY",[Date],"<"&[@Date])/SUMIFS([Qty],[Scrip Name],[@[Scrip Name]],[Status],"BUY",[Date],"<="&[@Date]))*[@Qty]) |
A2:A13 | A2 | =ROW(A1) |
F14 | F14 | =SUBTOTAL(109,[Qty]) |
G14 | G14 | =IFERROR(Transaction[[#Totals],[T.Amount]]/Transaction[[#Totals],[Qty]],"-") |
H14 | H14 | =SUBTOTAL(109,[T.Amount]) |
I14 | I14 | =SUBTOTAL(109,[C.O.G]) |
Thanks in Advance.