VBA to update value in VLOOKUP looked up data

adamchater

New Member
Joined
Jul 17, 2024
Messages
8
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I am creating a home inventory system that we can use when shopping for items, which will hold a list of all the items we buy and how many we have of each one. This raw data will also include the item's barcode value, so it can be looked up from another sheet, which will serve as the main page of the application.

When an item's barcode value is inputted into a text box on the main page, a VLOOKUP is performed which returns the item's current inventory level. This is already done, as this is just a VLOOKUP.

What I would now like to do is have two buttons (presumably linked to a macro). Depending on which button is clicked I would then like the item's inventory level (in the raw data sheet) to be either increased or decreased by one. I feel like this should be simple but I just can't work out how to do it, so any help would be very much appreciated.

Any solution needs to work in Excel 2010 please as that's the only version I have at home.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Any solution is going to be heavily dependent upon the structure of your sheet, which you have not provided. I suggest you post two things:
1. a small sample of your data, that includes the row and column headers, so we can see exactly where everything is located on your sheet;
2. what the expected result of your sample data should look like after your desired process is complete.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,225,136
Messages
6,183,073
Members
453,147
Latest member
Lacey D

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