Solved

Cascading Drop Down... Excel Combo Boxes

Posted on 2014-09-05
10
790 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 1

Author Comment

by:-Polak
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Author Comment

by:-Polak
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now