Need formula

punit83

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

I am looking for a formula, which can help me to calculate my cost of the goods at time of selling.
Attachment is for refrence.

just for info
a) in coloumn j4 unit of my 1st purchase are sold out and by balance unit is 0, so in coloumn j5 i want to take new cost from the date of purchase from 09/03/21.
b) in coloumn j9 cost of 3 units is average from 28/04/21 (2 @ 673.017) to 12/05/21 (1 @ 676.676)

Hope i could make understand my query with given example.
Thank in advance for any reply/help.

Need Formula.xlsx
ABCDEFGHIJK
1#DateStatusScrip NameQtyRateAmount C.O.G/UnitCost of Goods TotalDifference
20119/11/20BuyAdani Enterprise15490.7087,360.637,360.630.00
30207/01/21SellAdani Enterprise-10502.121-5,021.21490.708-4,907.08114.13
40312/01/21SellAdani Enterprise-5517.310-2,586.55490.708-2,453.54133.01
50409/03/21BuyAdani Enterprise10673.0176,730.176,730.170.00
60528/04/21SellAdani Enterprise-8644.594-5,156.75673.017-5,384.14-227.39
70612/05/21BuyAdani Enterprise11676.6767,443.437,443.430.00
80713/05/21SellAdani Enterprise-10700.483-7,004.83676.676-6,766.76238.07
90818/10/21SellAdani Enterprise-368.082-204.25674.237-2,022.71-1,818.46
10Total80-1,560.640.00-1,560.64
Sheet 1
Cell Formulas
RangeFormula
J3:J4,J8:J9,J6J3=[@[C.O.G/Unit]]*[@Qty]
K2:K9K2=[@[Cost of Goods Total]]-[@Amount]
J10J10=SUBTOTAL(109,[Cost of Goods Total])
K10K10=SUBTOTAL(109,[Difference])
A2:A9A2=ROW(A1)
C10C10=SUBTOTAL(103,[Status])
E10E10=SUBTOTAL(109,[Qty])
F10F10=IFERROR(Cs.Transaction27[[#Totals],[Amount]]/Cs.Transaction27[[#Totals],[Qty]],"-")
G10G10=SUBTOTAL(109,[Amount])
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,093
Latest member
dbomb1414

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