Formula for Stocks Avg Cost

punit83

Board Regular
Joined
Jan 17, 2018
Messages
84
Office Version
  1. 2019
Platform
  1. Windows
Hello !!!

Stock.xlsx
ABCDEFG
1DATECN#SCRIPSUNITRATEAMOUNT
228/01/22N-2015019KSK Energy VenturesB10077.507,750.00
323/02/22N-2015032KSK Energy VenturesS6085.505,130.00
425/02/22N-2015038KSK Energy VenturesB10076.507,650.00
503/03/22N-2015042KSK Energy VenturesS5080.504,025.00
620/03/22N-2015054KSK Energy VenturesB2562.701,567.50
710/04/22N-2015067KSK Energy VenturesS2563.501,587.50
824/04/22N-2015076KSK Energy VenturesB5058.852,942.50
930/04/22N-2015080KSK Energy VenturesS5057.022,851.00
1031/07/22N-2015145KSK Energy VenturesB2042.15843.00
1101/01/23N-2016001KSK Energy VenturesS2051.851,037.00
Sheet1
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hello !!!


Stock.xlsx
ABCDEFG
1DATECN#SCRIPSUNITRATEAMOUNT
228/01/22N-2015019KSK Energy VenturesB10077.507,750.00
323/02/22N-2015032KSK Energy VenturesS6085.505,130.00
425/02/22N-2015038KSK Energy VenturesB10076.507,650.00
503/03/22N-2015042KSK Energy VenturesS5080.504,025.00
620/03/22N-2015054KSK Energy VenturesB2562.701,567.50
710/04/22N-2015067KSK Energy VenturesS2563.501,587.50
824/04/22N-2015076KSK Energy VenturesB5058.852,942.50
930/04/22N-2015080KSK Energy VenturesS5057.022,851.00
1031/07/22N-2015145KSK Energy VenturesB2042.15843.00
1101/01/23N-2016001KSK Energy VenturesS2051.851,037.00
Sheet1



Column D : B=Buy / S= Sold

Need formula to calculate average cost for stock sold.

Eg: in row 3 when sold 60 unit that time want to calulate avg purchased cost from row 1

Stock.xlsx
ABCDEFGHI
1DATECN#SCRIPSUNITRATEAMOUNTCOSTOTAL COS
228/01/22N-2015019KSK Energy VenturesB10077.507,750.00
323/02/22N-2015032KSK Energy VenturesS6085.505,130.0077.504,650.00
Sheet1
Cell Formulas
RangeFormula
I3I3=E3*H3



and when in row 5 sold that time it calculates balance cost from row 2 + new purchased in row 4.
I think can be said running cost after.
Stock.xlsx
LMNOPQ
1DATECN#SCRIPUNITRATEAMOUNT
228/01/22N-2015019KSK Energy Ventures4077.503,100.00
323/02/22N-2015032KSK Energy Ventures10076.507,650.00
414076.7910,750.00
Sheet1 (2)
Cell Formulas
RangeFormula
Q2:Q3Q2=O2*P2
O4,Q4O4=SUM(O2:O3)
P4P4=Q4/O4

Thanxs in Advance :-)
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,121
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top