?
Solved

Cascading Drop Down... Excel Combo Boxes

Posted on 2014-09-05
10
Medium Priority
?
837 Views
Last Modified: 2014-09-17
Hi Experts,

This is a follow up to this question: http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_26451367.html

Background, I have a need to create drop down menus using a Form Controls Combo Box rather than a cell with data validation. The reason for this is because I would like to keep the items selected in the combo box drop down in a UI across the top of ALL worksheets. As such, I will use combo boxes and then create Indirects for the "link cell" resulting from a combo box selection to point dependent cells to. As I'm unfamiliar with combo box form controls let me know if anything I just described sounds dumb/not possible.

Second, I would like your assistance in creating cascading drop downs for the combo boxes, I found that the method describe in the previously linked question will not work for combo boxes. Therefore, I'm looking for an alternative solution.... Let me know what you can do and thank you in advance.

Dummy File is attached.
CDD-EE-Sample.xlsx
0
Comment
Question by:-Polak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40306873
I see no reason why you still cannot use Data Validated cells in your common UI workspace across the worksheets.   Is it your intention to have the values editable in any sheet, yet display the same values as you move from sheet to sheet?

A combination of indexing functions (ex., VLOOKUP) and Worksheet_Activate events could accomplish this.

By the way, the example you provided does not demonstrate cascading or dependent selections; they're independent of each other.

Regards,
-Glenn
0
 
LVL 1

Author Comment

by:-Polak
ID: 40306886
Hi Glenn, yes that is exactly what I need..... the drop down cells in the UI workspace (really just a frozen top row of cells) to be editable in any sheet yet display the same values as you move sheet-to-sheet....

My impressions was if I just copy and pasted the data-validated cells on each sheet that there wouldn't be a way to link them so that if a change was made on one sheet it would be accomplished on another.

ALSO, because I'm using a freezing a SINGLE row for my UI workspace using combo boxes was easier from a formatting perspective as I am unaware of a way to freeze multiple data validated cells to keep the UI workspace "floating".

Regarding the example yes, that is what I needed the majority of help with.... or so I thought until you told me there is an easier workaround than using combo boxes (which represent the same value across multiple sheets).
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 2000 total points
ID: 40306929
I'm attaching an example file that demonstrates what I think could work for you. I haven't implemented the full cascading/dependent data validation (just years and makes), but it does show how one could have a set of common values across separate sheets that always maintain the same values.

-Glenn
EE-CrossSheet-DataValidation.xlsm
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:-Polak
ID: 40306975
I see what you did there... that would work, but going back to what I said about formatting. Is there a way to incorporate multiple data validated cells into a floating UI/Navigation.... I'm currently freezing the top row so combo boxes seemed to be a better solution and hence why I embarked down trying to figure out if combo boxes could cascade. (See attached)
Navigation-Mock-Up-EE.xlsx
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40307231
I'm not sure I see what the issue might be.  In my example, one would just freeze panes at row 2, leaving rows 1 and 2 static and allow everything below scrollable.
0
 
LVL 1

Author Comment

by:-Polak
ID: 40307829
Well I feel like an idiot now, I never knew that dragging from the top-down vs. the bottom-up would produce a different freeze pane results (4 panes*not desired* vs. 2 panes). Now, that I've figured that out, you can continue with your solution; however, if you were just going to accomplish the cascading using the solutions described by either of the members in my previously linked solution I can manage from here. If you have another way to go about it please let me know.

FYSA in the production version of this spreadsheet the are three layers of cascading with 5 options in the 1st, 29 options in the second, and 30 options in the 3rd. I'd be interested to know if there was a non-VBA method to cascade the lists if a user didn't follow the "order of selection" (ala. they went one, two, three and then went back to #2 and made a change).
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40313291
Hi,
I wasn't planning on changing any methodology in terms of dependent/cascading data validation.  However, this method only works in an hierarchal order, that is, the "children" values require a parent value to be selected in order to work.  One can't jump around and select in any order.  However, updating an earlier-selected value is acceptible; but it might require selecting new children values to have a valid total selection.

-Glenn
0
 
LVL 1

Author Comment

by:-Polak
ID: 40314936
Thanks Glenn I've posted what I ended up doing, and the VBA you posted earlier works just great. (as a note I only focused on "Region" (M2) for the EE File)

Quick question regarding how I achieved the cascading, I used one of the methods described in my previously answered question as it saved me a lot of time from having to create a bunch of named ranges. However, its not very intuitive to understand.  Here are the formulas for the 3 named ranges used in the data validation lists:

Region: =Menus!$A$2:INDEX(Menus!$A:$A,MATCH("ZZZZZZZ",Menus!$A:$A))
Branch: =Indirects!$A$2:INDEX(Indirects!$B:$B,MATCH("ZZZZZZZ",Indirects!$B:$B))
CascadeBranch: =INDEX(Indirects!$B:$B,MATCH(Standard!M2,Indirects!$A:$A,0)):INDEX(Indirects!$B:$B,MATCH(Standard!M2,Indirects!$A:$A,0)+COUNTIF(Indirects!$A:$A,Standard!M2)-1)

Note that in "CascadeBranch" M2 will change to the row directly above the cell you have highlighted because its not an absolute reference.

I'm generally confused about matching "ZZZZZZZ" (doesn't exist) and how addition and subtraction is being applied to the Index and Match functions contained in CascadeBranch.....
EE-Safe-Cascading.xlsm
0
 
LVL 1

Author Closing Comment

by:-Polak
ID: 40317591
VBA worked to solve my issues, let me know if you can clarify how the cascading was achieved.
0
 
LVL 1

Author Comment

by:-Polak
ID: 40328698
Hi Glenn as a follow-up, if I wanted your macro to run if someone were to press the "delete" key when using any of the drop-downs what would I have to do to the code?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question