Single Formula to acheive FIFO Costing

jim may

Well-known Member
Joined
Jul 4, 2004
Messages
7,486
The left table (Columns A:E ) is my recent Purchase History of a product. Next, Columns G and H are my day-end Inventory Qtys. I'd like a formula in Column I that
would begin by searching the History table, in the example shown since I want the value as of 5/31/2015, I should first select (from the history table) the first date = to, or less than 5/31/2015, and in this case the 5/28/2015 row. And keep going up accumulating the full extended values, BUT no more that the Qty on Hand. In the # 5 layer I only need 586 of the 600 bought. I'm at a loss as to how to beging this formula. Can anyone assist? TIA, Jim



Excel 2012
ABCDEFGHIJKLMNOP
1
2From Layer/Series # >>54321
3Layer or** PURCHASING HISTORY **** DAY END ON HAND INVENTORY **Qty in Layer/Series >>500500600400586<< Limit total to 2,586
4Series #DateQtyExtensionU/PriceDateQtyValueU/Price Layer/Series >>$ 4.10$ 3.90$ 3.90$ 3.85$ 3.90
5105/10/20156002,340.00$ 3.900005/31/20152,586$ 10,165.40<< Need Formula to Produce20501950234015402285.4$ 10,165.40
6205/15/20154001,540.00$ 3.850006/01/20152,398which I have computed here >>
7305/20/20156002,340.00$ 3.900006/02/20152,398
8405/25/20155001,950.00$ 3.900006/03/20152,236
9505/28/20155002,050.00$ 4.100006/04/20152,686
10606/04/20155001,936.97$ 3.873906/05/20152,560
11706/07/20154501,777.12$ 3.949206/06/20152,530
12806/09/201530130.00$ 4.333306/07/20152,860
13906/14/20153201,643.07$ 5.134606/08/20152,700
141006/18/2015260950.93$ 3.657406/09/20152,531
Sheet1
Cell Formulas
RangeFormula
I5=SUM(K5:O5)
K3=C9
K4=E9
K5=K3*K4
L3=C8
L4=E8
L5=L3*L4
M3=C7
M4=E7
M5=M3*M4
N3=C6
N4=E6
N5=N3*N4
O3=H5-SUM(K3:N3)
O4=E5
O5=O3*O4
P5=SUM(K5:O5)
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,215,219
Messages
6,123,687
Members
449,117
Latest member
Aaagu

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