PDA

View Full Version : fifo vba code please



hutupis
02-20-2021, 05:20 AM
Hi,
Firstly I apoligize for my english level. I hope I can explane myself. I am using Office 2010 Turkish.

I share a file. İt include 2 pages. Fisrt name is ALIS and second name is SATIS.
ALIS has include purchase details and SATIS has include sales details.
I need cost of goods for column K for each pages as first in fisrs out. But same stocks sales may before purchase.

https://we.tl/t-DNVz8EwphP (https://we.tl/t-DNVz8EwphP)

SamT
02-20-2021, 09:10 AM
WeTransfer is a membership only service

Please use the "Go Advanced" button to "Manage Attachments" to upload your files here.

hutupis
02-20-2021, 09:46 AM
file is 8,50 mb and ı colud not add :(

snb
02-20-2021, 09:49 AM
@SamT

Wetransfer is an open service.

SamT
02-20-2021, 02:44 PM
Why aren't you helping the OP? I, personally, am not going to agree to a 9 page Terms of Service.

A two sheet 8.5 MB excel file is kinda unique. Must be a real Work Of Art.

hutupis
02-21-2021, 01:20 AM
Why aren't you helping the OP? I, personally, am not going to agree to a 9 page Terms of Service.

A two sheet 8.5 MB excel file is kinda unique. Must be a real Work Of Art.

"the op " what is meaning.

file is 8,50 mb because it include 2011-2020 data.

İs not possible make a vba code ?

macropod
02-21-2021, 02:07 AM
Cross-posted at: https://www.mrexcel.com/board/threads/fifo-vba-code.1162492/
Please read VBA Express' policy on Cross-Posting in Rule 3: http://www.vbaexpress.com/forum/faq.php?faq=new_faq_item#faq_new_faq_item3

SamT
02-21-2021, 10:10 AM
OP = Original Post, or Original Poster, or hutupis

Remove all data except one month of 2011 for Example to upload.

We don't need all data to code. We only need a small example of data

hutupis
02-21-2021, 10:58 AM
OP = Original Post, or Original Poster, or hutupis

Remove all data except one month of 2011 for Example to upload.

We don't need all data to code. We only need a small example of data

İt is attached.

SamT
02-21-2021, 12:41 PM
ALIS is the "FI" of FIFO
SATIS is the "FO" of FIFO

Cost Of Inventory by Date is where the *COGS of the Sold items can be calculated from

For Example:


On Day 1, you buy 100 items at $1.00, On day 2 you buy 100 items at $1.10, and on day three you buy 100 items at $1.20
On day 2, you sell 150 items. The cost of those items is (100 x 1.00) + (50 x 1.10) / 150
On day 3 you sell 75 Items, The cost of those items is (50 x 1.10) + (25 x 1.20) / 75
On day 4, you sell 50 items, The cost of those items is (50 x 1.20) / 50


This system does not work if you sell items not in inventory

You will need a Dynamic Inventory Table

At the end of Day 1, it would have 100 items @ $1.00
At the end of day 2, it would have 50 items @ $1.10
At the end of day 3, it would have 75 items @ $1.20
At the end of day 4, it would have 25 items @ $1.20


The Inventory Table must be updated each time something is purchased or sold.

This will be a very complicated Excel system or a pretty simple Access system.



*Note: "COGS" is actually Total cost of goods sold, which includes many particulars I am Ignoring herein