Dynamic Dependent Dropdown List

Jemini Jimi

New Member
Joined
Jan 11, 2025
Messages
28
Office Version
  1. 365
Platform
  1. Windows
I am trying to create a Dynamic Dependent Dropdown List, one that updates as data is added to the right of the original list. There will be a different DDL on every sheet in the workbook.
I have tried many things, but I've never been able to get it to work.
If this can be accomplished with a formula that can be copied and pasted, or with VBA, that would be great.

The data Headers will always start in cell U30 and will continue to the right. The first issue I ran into was that there will be blanks and symbols in the text. (green)
mr excel 1.png

A table will be used for data entry. I need the DDL in cells BD2 & BE2.
mr excel 2.png
 
Burrgogi, I've looked at this, and unfortunately, it won't work for what I'm trying to do. That shows how you can add additional dropdowns if needed.
I will have only two dropdowns in cells BD2 & BE2. The data list will expand to the right, so the DDL needs to accommodate that.

The first issue I ran into was that there will be blanks and symbols in the text. (green)
I was able to resolve this issue using this macro and formula.

How to remove special (unwanted) characters from string in Excel

 
Upvote 0
I am a little unsure just what you have after resolving the first issue but to resolve the issue of an expanding list with Data Validation, IF you have the relatively new TRIMRANGE function & associated Trim Refs notation you can do this.

Here is my initial list that may expand to the right and/or down. In my Data validation I have limited that to columns U:AZ and rows 30:100 but that can be altered if required.

BTW, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)

Jemini Jimi.xlsm
UVWXYZAA
30Header 1Header 2Header 3Header 4Header 5Header 6
31Item 11Item 21Item 31Item 41Item 51Item 61
32Item 12Item 22Item 42Item 52Item 62
33Item 13Item 23Item 43Item 63
34Item 14Item 44
35Item 45
36
Sheet1


For Data validation in the table ..

Jemini Jimi.xlsm
BABBBCBDBEBFBGBH
1Hdr1Hdr2Hdr3SectionActivityHdr6Hdr7Hdr8
2aHeader 2Item 22
3bHeader 5
Sheet1
Cells with Data Validation
CellAllowCriteria
BD2:BD3List=$U$30:.$AZ$30
BE2:BE3List=INDEX($U$31:$AZ$100,0,XMATCH(BD2,U$30:.AZ$30))


Notice in the DV formulas there is one instance each where there is a colon followed by a period ":." in a range reference. This is the Trim Refs notation.

Here is an example of the 'Section' drop-down

1743653121559.png


.. and the subsequent 'Activity' drop-down

1743653172071.png


IF you do not have the TRIMRANGE/Trim Refs option yet then post back for an alternative if it looks like what I have described/shown is what you are after.
 
Upvote 0
Solution
Peter, this works perfectly!
I did not need to remove blank spaces or special characters, as I was told was necessary for DDL to work.
Thank you so much, I learned a lot. :)
BTW I will install XL2BB
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

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