How to auto update product stock when a sale happens ?

psahani

New Member
Joined
Nov 19, 2018
Messages
1
On sheet1 I have product lists along with all the details and unique barcode.

On sheet1 "barcode" column is "A" and "stock quantity" column is "E".
On sheet2 "barcode" column will be "A" for scanning the barcodes and available "stock quantity" column will be "B".


what I want is whenever I scan barcodes on column "A" on sheet2 the following things should happen...

1) column "B" should display the available stock quantity and column "C" value will be "1".

[TABLE="class: cms_table_outer_border, width: 500"]
<tbody>[TR]
[TD]barcode (A)[/TD]
[TD]stock quantity(B)[/TD]
[TD]sale quantity(C)[/TD]
[/TR]
[TR]
[TD]barcode1[/TD]
[TD]3[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]barcode2[/TD]
[TD]5[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]barcode3[/TD]
[TD]10[/TD]
[TD]1
[/TD]
[/TR]
</tbody>[/TABLE]


2) My data contains few same barcodes with different stocks (including 0 stock) quantity (but product is same) on sheet1. So if I scan a barcode on sheet2 column "A" then column "B" should display the product quantity which is equal or grater than "1".

3) On cell "D2" I will have a button called "Update". And when I will click the "update" button my stocks on sheet1 will be updated calculating this (column B - column C)
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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