Creating a list of values based on dropdown/combobox selection

piannetta

New Member
Joined
Aug 27, 2002
Messages
42
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

I have a comboxbox on a spreadsheet that is populated with a list of managers. What I'm trying to achieve is to create a list of employees reporting to that manager from a master list of about 150 employees. Then if a different manager is selected from the dropdown, the resulting list of employees changes.

I'm struggling to figure out how to do this and hoping I could get some tips/ideas please?

Cheers,
Pete
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

I have a comboxbox
ActiveX or Forms?
Linked cell?

master list of about 150 employees.
Does that have employee in the left column and manager in the right column? If not, details please (or small sample with XL2BB)
 
Upvote 0
Apologies, I have updated my profile and installed XL2BB

It's a form control

So I have a Home page where the control exists (which XL2BB won't include in the screenshot). What I'm hoping to achieve is that when a Team Leader is selected from the form control, in the cells beneath it I want a list of their employees to be populated.

The employee list looks like this:
Daisee Score Tool v1.0.xlsm
ABCDE
3Agent NameTLLocationAverage QA Score# QA >= Target
4No QA FoundNo QA Found
5No QA FoundNo QA Found
6No QA FoundNo QA Found
7No QA FoundNo QA Found
Results
Cell Formulas
RangeFormula
D4:D7D4=IFERROR((SUMIF(DaiseeExport!$B$2:$B$777299,Results!A4,DaiseeExport!$K$2:$K$777299)/COUNTIF(DaiseeExport!$B$2:$B$777299,Results!A4)),"No QA Found")
E4:E7E4=IFERROR((COUNTIFS(DaiseeExport!$B$2:$B$7297,Results!A4,DaiseeExport!$K$2:$K$7297,">="&Results!$B$1)/COUNTIFS(DaiseeExport!$B$2:$B$7297,Results!A4)),"No QA Found")


The Team Leaders are in a separate list:
Daisee Score Tool v1.0.xlsm
PQ
31
42
53
Results



Cheers,
Pete
 
Upvote 0
Thanks for updating your version profile and getting XL2BB going. (y)

It's a form control
Thanks.

Nothing seems to answer this though.
Linked cell?
That is, what is the linked cell of the combo box? The cell that is actually populated with the Manager.

The employee list looks like this:
I cannot see anything that looks like an employee on that mini sheet.
In any case, it did not answer this
Does that (master list) have employee in the left column and manager in the right column? If not, details please (or small sample with XL2BB)
When I eventually see a managers name or ID or whatever it is, how am I going to locate the employees that report to that manager?
 
Upvote 0
Thanks for updating your version profile and getting XL2BB going. (y)
Thanks.

Nothing seems to answer this though.
The linked cell is just a cell that has the Team Leader selection made on the combobox, it returns the position on the list, I then do a lookup to get the Team Leader name, and that's what I'd use to find employees on the employee list assigned to that leader.
Daisee Score Tool v1.0.xlsm
PQRS
17Marcus Singh
2
Results
Cell Formulas
RangeFormula
R1R1=VLOOKUP(Q1,P3:Q36,2,0)

That is, what is the linked cell of the combo box? The cell that is actually populated with the Manager.


I cannot see anything that looks like an employee on that mini sheet.
In any case, it did not answer this
The column "Agent Name" is the employee name.
When I eventually see a managers name or ID or whatever it is, how am I going to locate the employees that report to that manager?
That's the root of my question. Essentially what I'm asking is, is there a way in Excel that I can build a dynamic list based on the entry selected in the combbox and find entries in the employee list that match the combobox selection. I'm trying to determine if there's a way to do that other than writing some VBA code (which I'm fine to do) but hoping not to have to if there was a quicker (out of the box) option.
 
Upvote 0
The linked cell is just a cell that has the Team Leader selection made on the combobox, it returns the position on the list, I then do a lookup to get the Team Leader name, and that's what I'd use to find employees on the employee list assigned to that leader.
OK, so from your mini sheet it looks like the linked cell is Q1 (& R1 gets the name via VLOOKUP). That' helpful, thanks.

Essentially what I'm asking is, is there a way in Excel that I can build a dynamic list based on the entry selected in the combbox and find entries in the employee list that match the combobox selection. I'm trying to determine if there's a way to do that other than writing some VBA code
Yes there is, but to suggest exactly how, I need to know where the employee list is and what it looks like so I can work out how a particular employee is associated with a particular team leader
For example your list might look like this

piannetta.xlsm
AB
1Employee NameTeam Leader
2Emp 1Ann
3Emp 2Tom
4Emp 3Ann
5Emp 4Ann
6Emp 5Tom
7Emp 6Ann
8Emp 7Ann
9Emp 8Tom
10Emp 9Ben
Sheet2


.. or it might look like this

piannetta.xlsm
EFGHIJKL
1Team Leader IDTeam Leader NameStart DateEmployees
21Tom1/05/2020Emp 2Emp 5Emp 8
32Ann3/07/2018Emp 1Emp 3Emp 4Emp 6Emp 7
43Ben5/07/2022Emp 9
Sheet2


.. or any one of a myriad different ways.
It is no use me guessing so I'm asking for details or a sample mini sheet
 
Upvote 0
It looks like the above
Thanks. In that case try this.

piannetta.xlsm
ABR
1Employee NameTeam LeaderTom
2Emp 1AnnEmp 2
3Emp 2TomEmp 5
4Emp 3AnnEmp 8
5Emp 4Ann
6Emp 5Tom
7Emp 6Ann
8Emp 7Ann
9Emp 8Tom
10Emp 9Ben
Sheet2
Cell Formulas
RangeFormula
R2:R4R2=FILTER(A2:A10,B2:B10=R1)
Dynamic array formulas.
 
Upvote 0
Solution
Thanks. In that case try this.

piannetta.xlsm
ABR
1Employee NameTeam LeaderTom
2Emp 1AnnEmp 2
3Emp 2TomEmp 5
4Emp 3AnnEmp 8
5Emp 4Ann
6Emp 5Tom
7Emp 6Ann
8Emp 7Ann
9Emp 8Tom
10Emp 9Ben
Sheet2
Cell Formulas
RangeFormula
R2:R4R2=FILTER(A2:A10,B2:B10=R1)
Dynamic array formulas.
Thanks Peter, this works perfectly, I was unaware of this function until now and it's been an eye opener. I appreciate your patience working with me and in helping me find the perfect solution.

Cheers,
Pete
 
Upvote 0
You're welcome. Thanks for the follow-up.
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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