Cascading Combo Box Problems

KlingonCoder

New Member
Joined
Dec 20, 2011
Messages
3
Hi there, I’m hoping someone may be able to help me solve a problem I’m having. I am quite familiar with Excel, but am just starting to use VBA to achieve the results that I usually use formulas for. I am currently trying to create a workbook in Excel 2003 for tracking personnel data for numerous employees. I have one worksheet that I use for various dynamic lists and named ranges i.e. Departments, Positions, Office Locations, Employee Status etc. The remaining worksheets are laid out so that they are each dedicated to a separate employee’s information.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p> </o:p>
The situation that is plaguing me is that I am trying to create two cascading combo boxes. The first one is for the “Department” that an employee works for. This combo box is populated by a dynamic list and the second is for the “Position” within the selected Department. To make things even more of a pain, copies of this workbook will be used in different offices which are going to have some “Departments” and “Positions” that are unique to their location, therefore I can’t just create one list to rule them all, sorry bad pun. <o:p></o:p>
<o:p> </o:p>
For example, the following offices might have the following departments:<o:p></o:p>
Office 1: Management, Engineering, and Payroll <o:p></o:p>
Office 2: Drafting, <?xml:namespace prefix = st1 ns = "urn:schemas:contacts" /><st1:GivenName w:st="on">I.T.</st1:GivenName> and Security<o:p></o:p>
Office 3: Operations, Sales and Publications<o:p></o:p>
Head Office: all of the above plus another half dozen departments<o:p></o:p>
<o:p> </o:p>
Of course each department will have various positions within it, and the number of positions will vary from department to department.<o:p></o:p>
<o:p> </o:p>
I have no problem creating and naming a dynamic list for the departments, nor do I have a problem having the first combo box display those items. Where I am having difficulty is how to arrange my data and populate the second combo box. I originally had a list for the “Departments” and a second list for all “Positions”, which had two columns, one for the Position and the second for the parent Department. However, after reading numerous posts on dependant drop-down lists I tried rearranging my data so that each Department became a heading above a list of the Positions. This layout posed two problems:<o:p></o:p>
1. The first is that
Code:
=INDIRECT($B$30)
gave me an error when I tried to use it as the list source for the second dropdown list;<o:p></o:p>

2. But more importantly, I had no way of properly laying out the data since the Department list is going to vary from site to site, and I cannot trust that the users at each site will get things right<o:p></o:p>
<o:p> </o:p>
So after spending several hours trying to find a solution, I am here to plead for assistance. If anyone can suggest how to populate the list source for the second combo box I would be very grateful.<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
Rob
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi Rob,

Can you post some examples of how your list look like.which you want to use in dropdown...
 
Upvote 0
Hi Paddy,
Sorry not to have gotten back to you, things got nuts, other projects came up and to top it all off this problem is now moot as this project has been benched. Thanks for responding though.

Rob
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,126
Members
452,381
Latest member
Nova88

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