Valuation of Closing Stock FIFO (using purchase history and closing stock qty only)

Ahmed23236

New Member
Joined
Nov 23, 2020
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
I would like to value closing stock of an item based on latest prices the item bought on.
Table 1: Stock account
CODEDetailsUnits InStock balanceQTYVALUE
2602​
Red Bull BlueCan31
1014​
Coke Tin Mini_150MLCan57
407236​
Mars chocolate Single 51gmPKT12
461122​
Sinkers chocolate Twin 50gPKT31
Table 2; Purchases
DATECODEITEM NAMEUNITQTYCOST Price RupeesTOTAL
22-Sep​
2602​
Red Bull BlueCan
24​
35​
840​
22-Sep​
1014​
Coke Tin Mini_150MLCan
30​
6​
180​
22-Sep​
407236​
Mars chocolate Single 51gmPKT
24​
7​
168​
22-Sep​
461122​
Sinkers chocolate Twin 50gPKT
24​
8​
192​
29-Sep​
1014​
Coke Tin Mini_150MLCan
30​
8​
240​
21-Oct​
2602​
Red Bull BlueCan
24​
32​
768​
21-Oct​
461122​
Sinkers chocolate Twin 50gPKT
24​
9​
216​

For example: Closing stock of Redbull is 31 tin. Latest price bought is Rupees 32 but qty is less than closing stock . So Stock value is 24*32rupees+(31-24)*35rupees= 1013 rupees
I used this formula to get latest price =LOOKUP(2,1/(PURCHASE!$D$6:$D$9999='STOCK ACCOUNT'!$A3),PURCHASE!$I$6:$I$9999) and multiplied with closing qty but if latest qty bought is less than balance qty i can not use this formula.

Please suggest a formula or a VBA.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,215,513
Messages
6,125,258
Members
449,219
Latest member
daynle

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