Fill 3rd combobox based on value of previous two

Mikeymike_W

Board Regular
Joined
Feb 25, 2016
Messages
171
Hi and thanks in advance for any help.

I am making a userform for a Tarot card class. Combobox 1 lists the suits, Combobox 2 lists the value of the card and I want Combobox 3 to take the first two values (say pentacles & King) and to find the King of Pentacles from a list of tables in Sheet 2 and use the first column in that table to populate the list for combobox 3.

Combobox1 and combobox2 are populated from a sheet named "lists". I have several tables on this sheet which i have named and i put the name into the "row source" section of each combobox property.

I have a second sheet named "Interpretations", within this sheet i have 72 tables each one consisting of two columns. Column 1 of each table holds the list i would want combobox3 to be populated with however as i mentioned before there are 72 tables to choose from (each table has an individual name.

There may be an easier way to organise this but i'm new to this and I can't think of anything better, open to suggestions though :)

Finally once combobox three is selected i would like a textbox in the userform to be filled with the value that the three comboboxes would indicate from the table in the interpretation" sheet.

I hope this makes sense.

Thanks for your help,

Mike
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
look into application.index(rangeofresults, application.match(combo1&2selection, rangeofcombos,0))
Then you can use that to return the result.
 
Upvote 0
look into application.index(rangeofresults, application.match(combo1&2selection, rangeofcombos,0))
Then you can use that to return the result.

Hi Roderick, thanks very much for taking the time to reply.
I've been googling my heart out trying to understand the code you posted but it is beyond me.

If you can could you tell me how I would customise the code for my needs?
Is the code placed in as part of the VBA code for Combobox3?

Finally once it finds the match for combobox1&2 would it automatically populate combobox3 with the content of the table from the match of combobox1&2?

Thanks so much for your patience and help,

Mike
 
Upvote 0
I am interested in helping you with specific coding but I would need a better idea of the structure of your tables etc. Can you provide a link to your workbook? That would make helping a lot easier.
 
Upvote 0
Thanks everyone for your help, managed to get it working.
Just put in an invisible text box that was populated with the combobox values then used this as the value for my vlookup.

Thanks again,

Mike
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

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