VB to loop through several dropdown lists

ChayaNYC

New Member
Joined
Oct 24, 2013
Messages
1
How would I create a VB Macro to loop through several dropdown lists and then add all the values to cells on another worksheet?

I would like to automatically generate the various combinations for the values in a group of 10 dropdown lists, so when it reaches the end of the last dropdown list I need it to advance to the next option in the previous list and then restart the loop in all subsequent dropdowns (i.e. when it reaches the last option in list #10, it advances list #9 to the next option and resets list #10 to the 1st option.

All values are text. I am using Defined Names in the Data Validation Lists, but I’m trying to avoid having to use Table Names since there are 500+ tables.

I’ve done this in Javascript (with nested lists) but I’m having some difficulty figuring out the proper way to do this in Excel and VB. I haven’t found any information on how to loop through several dropdown lists in this manner, and though I’ve found a few postings with the code to loop though a single dropdown list (i.e. Loop through each row of a range in Excel - Stack Overflow) I've had trouble finding clear explanation or tutorials so that I could understand and adapt the code.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,223,246
Messages
6,170,987
Members
452,373
Latest member
TimReeks

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