Macro to choose from Dynamic Lists and then populate cells

jonniew

New Member
Joined
Apr 4, 2019
Messages
1
Hi,

I'm looking to create a macro that will allow me to setup a spreadsheet template whereby the user is prompted to select one value, then another and on the basis of these 2 other values are populated. So for example, the user is prompted to choose a category and then a division, which then in turn populates a directorate and location. I've done much searching both on here and on google but have not managed to find anything. Hoping someone be able to assist, I unfortunately have a fairly limited knowledge of macros, the little knowledge I do have having come from my old friend, Mr Google.

Any assistance, even if you can point me in the right direction of a resource that might help me would be greatly appreciated.

Thanks,

Jonnie
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I would tackle this by first creating dynamic named range for each lookup, then a table that has all of your admin & corresponding divisions. Then concatenate all category & divisions to lookup the directorate like so:

CategoryDivisionLookupDirectorate
AdminFinanceAdminFinance800.555.1234
AdminOperationsAdminOperations800.555.2345
SupportTechSupportTech800.555.3456
SupportPeopleSupportPeople800.555.4567

<tbody>
</tbody>

Then you can use data validation for your users to lookup the category, then the division and then do a vlookup for the directorate. No macro's required :)

So if your input table looks like this:
CategoryDivisionDirectorate

<tbody>
</tbody>

Once a user inputs a category and division, you would use vlookup like =IFERROR(VLOOKUP(A2&B2,LookupTable,2,FALSE),"Directory Not Found")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,401
Members
448,893
Latest member
AtariBaby

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