Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a spreadsheet with 2 worksheets, products and orders. I also have a form for new orders. Basically I want the stock level on the products page to be updated when the order is placed. Even if you can't help with the coding side I would be interested to know how you think I should go about solving the problem I have.

Thanks
Posted

1 solution

IMO, the easiest way would be to name the specific ranges in the spreadsheet.

For example, if you had the following table:

ProductStock
Shampoo15
Soap13


I would name the cell with the number 15 in it something like "ShampooStock" and the cell with the number 13 in it something like "SoapStock".

Then, whenever an order is placed, you access the sheet and the named range like:

VB
Worksheets("Products").Range("ShampooStock") = Worksheets("Products").Range("ShampooStock") - NumberOrdered
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900