Solved

Cascading Drop Down... Excel Combo Boxes

Posted on 2014-09-05
10
802 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
  • 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 500 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

825 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