Excel VBA - add adjacent cell value to a table for a list, if check box is checked

Dont Call me Betty

New Member
Joined
Sep 29, 2023
Messages
19
Office Version
  1. 365
Platform
  1. Windows
I have a Data Validation list drop down in i4
Table for that list will be on a separate tab
in C9-18 are check boxes
in D9-18 are cell values that I need to be added to the Table, if corresponding check box is checked

Need to only the values for which check box is checked to appear in the drop down list in i4
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
It's doable. What part are you having issues with?
Hi,
The part with:
in C9-18 are check boxes
in D9-18 are cell values that I need to be added to the Table, if corresponding check box is checked

Need to only the values for which check box is checked to appear in the drop down list in i4
 
Upvote 0
Assuming they are Form control check boxes...

Pick a spot other than D9-D18 to hold the filtered list of values. Something like F9-F18 that can be cleared and rebuilt over and over again.

Write a macro that does these things:
  • Clears the old filtered list in F9-F18 or wherever you've selected.
  • Checks the value of each check box control and adds the corresponding value in D9-D18 to your filtered list area.
  • Reset the data validation settings in cell I4 to match the size of the new filtered list.
Then, create a click event macro for each of the check box controls that runs the above macro, so the filtered list updates with each check box change.

That would be how I'd go about it.
 
Upvote 0
Assuming they are Form control check boxes...

Pick a spot other than D9-D18 to hold the filtered list of values. Something like F9-F18 that can be cleared and rebuilt over and over again.

Write a macro that does these things:
  • Clears the old filtered list in F9-F18 or wherever you've selected.
  • Checks the value of each check box control and adds the corresponding value in D9-D18 to your filtered list area.
  • Reset the data validation settings in cell I4 to match the size of the new filtered list.
Then, create a click event macro for each of the check box controls that runs the above macro, so the filtered list updates with each check box change.

That would be how I'd go about it.
I thought that much, problem is in making that macro :)
 
Upvote 0

Forum statistics

Threads
1,215,102
Messages
6,123,099
Members
449,096
Latest member
provoking

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