Inventory transfer through VBA

Zubair

Active Member
Joined
Jul 4, 2009
Messages
304
Office Version
  1. 2016
Platform
  1. Windows
Mr. Excel.xlsx
ABCDEFGHIJ
1Inventory Data Form
2TransactionInventory Transfer
3Document No.5001
4Date22/02/2022
5
6Location FromFactory 1
7Location ToFactory 2
8
9BrandSizeQuantityRateAmount
10ABC2125601,500
11CDE291255660
12
13
14Data base
15TransactionDocument No.DateLocation FromLocation ToBrandSizeQuantityRateAmount
16Opening stockFactory 1ABC21100606,000
17Opening stockFactory 1CDE2950552,750
18
19Inventory Transfer500122/02/2022Factory 1ABC21-2560(1,500)
20Inventory Transfer500122/02/2022Factory 2ABC2125601,500
21Inventory Transfer500122/02/2022Factory 1CDE29-1255(660)
22Inventory Transfer500122/02/2022Factory 2CDE291255660
23
24Closing stockFactory 1ABC2175604,500
25Closing stockFactory 2ABC2125601,500
26Closing stockFactory 1CDE2938552,090
27Closing stockFactory 2CDE291255660
Inventory transfer
Cell Formulas
RangeFormula
J24:J27,J19:J22,J16:J17,E10:E11E10=+C10*D10
D19D19=+B6
E20E20=+B7
D21D21=+B6
E22E22=+B7
H24H24=+H16+H19
H25,H27H25=+H20
H26H26=+H17+H21



Hi,

I need VBA to record transfer stock from Factory 1 to Factory 2 in tab "database" through Inventory Data Form.
please help
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi Zubair,

please explain more clearly. I see in the rows 19 to 22 there are items to be transferred from factory1 to factory2. What do you need in the tab 'database ' to happen?
  • Do these lines need to be added to the bottom? or something else?
  • Do lines 19-22 then need to be cleared from the first sheet?
  • Other actions?
 
Upvote 0
Hi sijpie,

Yes lines to be added at the bottom
Yes after transfer lines Inventory Data Form to be cleared.
Please keep in mind positive and negative transactions as shown in lines 19-22 as an example, I have put manually to show how I want.

Thanks in Advance.
 
Upvote 0
Maybe I can do this coming week, else it will be the week after
 
Upvote 0
Hi Zubair, a few questions:
1. is your database on the same sheet as the form?
if so, would you consider moving it to a separate sheet? That is far safer for your data.
else, what is the sheet name for the data base?

2. I am assuming that the number of items to be moved can be more than two, so line 10-11 could extend downwards

3. Here the transaction is a inventory transfer. Are there any other transaction types possible?

4. In the database you have opening stock, closing stock and in between inventory transfer. The next inventory transfer (or any transaction) is to come below the last transaction, above the first closing stock line. Correct?
 
Upvote 0
Hi Zubair, a few questions:
1. is your database on the same sheet as the form?
if so, would you consider moving it to a separate sheet? That is far safer for your data.
else, what is the sheet name for the data base?

2. I am assuming that the number of items to be moved can be more than two, so line 10-11 could extend downwards

3. Here the transaction is a inventory transfer. Are there any other transaction types possible?

4. In the database you have opening stock, closing stock and in between inventory transfer. The next inventory transfer (or any transaction) is to come below the last transaction, above the first closing stock line. Correct?
1. Separate tab with same name "Database"
2. Yes, I have given example i.e. in Inventory data form line 10 is appearing in database lines 19 & 20 (minus Location from and plus in Location to) similarly line 11 appears in 21 & 22.
3. No in this program we are only maintaining movement of stock between 4 locations Factory 1, Factory 2, Warehouse 1 & Warehouse 2.
4. Yes Opening & closing stock mentioned only for your understanding purpose, the basic requirement is to move positive & negative figures for a single transaction.
 
Upvote 0
Ok, will continue with it later in the week or next week
 
Upvote 0

Forum statistics

Threads
1,215,438
Messages
6,124,873
Members
449,192
Latest member
MoonDancer

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