checkbox vlookup

sappster

New Member
Joined
Aug 24, 2011
Messages
9
Does anyone know of a way to allow a cell on my sheet be updated by a vlookup property when a checkbox is clicked? I have 4 comboboxes and when the last combox is selected I need that part number to be looked up by the checkbox if its selected and have that value put into another cell.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I hope you are using a "Forms" CheckBox. If so, right click on the check box, select "Format Control" option. In the "Control" tab, in the Cell Link field, put a cell in the sheet. When the checkbox is checked or unchecked, the value in the cell will change between "true" or "false".

You may then put this formula in another cell.
IF([linked cell],[vlookup function],"")

If the checkbox is checked, the cell with the above formula will show the vlookup value, otherwise it will return blank.

Hope this helps...
 
Upvote 0
Thanks for the response, however I forgot to mention I am using a Userform instead of being inside the excel sheet. is there a way to do this with a checkbox in the userform?
 
Upvote 0
Open the user form in design mode. Right click on the control and select "View Code". There might be existing code. Add this code:
Cells(5, 5) = <CheckBoxName>.Value

When the box is toggled, Cell E5 will toggle between true and false.
 
Upvote 0
Just realized that my last post was missing key part of the code as I did not tag the code.

Open the user form in design mode. Right click on the control and select "View Code". There might be existing code. Add this code:
Rich (BB code):
Cells(5, 5) =[name of control]<name of="" control=""></name>.Value
 
Last edited:
Upvote 0
Saagar, what I need is when the part on the last combobox is selected I want to then click on a checkbox to make it true. And if it is true then I want a VLOOKUP to locate that item in the last combobox and fill the value into a cell on the sheet. If my combobox reads "cabinet" I want the checkbox to go find the corresponding "option" and put the "option" in a separate cell from the cabinet. Can this be done?
 
Upvote 0
In other words, if "cabinet" is the 3rd option out of 8 different options in the combobox, you want the checkbox to capture "3" and put it in a cell in a worksheet?
 
Upvote 0
If my combobox has 4 choices: cab1, cab2, cab3, cab4. If you select cab2 and also check the checkbox for drawer options then I want to put draw2 into a cell next to the cab2 cell. if you select cab3, I and select the checkbox then I want draw3 to be put into a cell next to the cab3 cell in the sheet.
 
Upvote 0
How are you determining the values "draw2" and "draw3"?

Also, please post a screenshot of your userform if possible.
 
Upvote 0
I have a table with 2 columns. One has cabinets as header with all cabinet values, the column next to that has all the draw items which correspond to the cabinets. When the combobox has the correct cabinet AND the checkbox is selected I want the checkbox to use the VLOOKUP to find the cell next to the cabinet in the sheet and add this to my form.
userform.GIF
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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