tsroque
Board Regular
- Joined
- Jan 19, 2007
- Messages
- 127
- Office Version
- 365
I have a group of employees with their group number in an Excel worksheet. I need to individually group these employees under their Manager's ID in worksheet2.
On Worksheet2, I set up a Validation list. When I choose a month, I want that corresponding information to filter on Worksheet2 and list the Employees with the same Mgr's ID.
Yes...I know I could Auto Filter it, and then copy and paste it to a separate worksheet, but what's the fun in that if you can automate it! Keep in mind that new Mgrs could be added.
Thanks!
:D
Book2 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | Jan | Feb | Mar | ||||||||
2 | Name | GroupID | MgrID | Name | GroupID | MgrID | Name | GroupID | MgrID | ||
3 | Employee1 | Group1 | Mgr1 | Employee1 | Group1 | Mgr1 | Employee1 | Group1 | Mgr1 | ||
4 | Employee2 | Group1 | Mgr1 | Employee2 | Group1 | Mgr1 | Employee2 | Group1 | Mgr1 | ||
5 | Employee3 | Group3 | Mgr3 | Employee3 | Group3 | Mgr3 | Employee3 | Group3 | Mgr3 | ||
6 | Employee4 | Group1 | Mgr1 | Employee4 | Group1 | Mgr1 | Employee4 | Group1 | Mgr1 | ||
7 | Employee5 | Group2 | Mgr2 | Employee5 | Group2 | Mgr2 | Employee5 | Group2 | Mgr2 | ||
8 | Employee6 | Group3 | Mgr3 | Employee6 | Group3 | Mgr3 | Employee6 | Group3 | Mgr3 | ||
9 | Employee7 | Group3 | Mgr3 | Employee7 | Group3 | Mgr3 | Employee7 | Group3 | Mgr3 | ||
10 | Employee8 | Group2 | Mgr2 | Employee8 | Group2 | Mgr2 | Employee8 | Group2 | Mgr2 | ||
11 | Employee9 | Group3 | Mgr3 | Employee9 | Group3 | Mgr3 | Employee9 | Group3 | Mgr3 | ||
12 | Employee10 | Group1 | Mgr1 | Employee10 | Group1 | Mgr1 | Employee10 | Group1 | Mgr1 | ||
13 | Employee11 | Group2 | Mgr2 | Employee11 | Group2 | Mgr2 | Employee11 | Group2 | Mgr2 | ||
14 | Employee12 | Group3 | Mgr3 | Employee12 | Group3 | Mgr3 | Employee12 | Group3 | Mgr3 | ||
15 | Employee13 | Group1 | Mgr1 | Employee13 | Group1 | Mgr1 | Employee13 | Group1 | Mgr1 | ||
16 | Employee14 | Group2 | Mgr2 | Employee14 | Group2 | Mgr2 | |||||
17 | Employee15 | Group2 | Mgr2 | Employee15 | Group2 | Mgr2 | |||||
18 | Employee16 | Group3 | Mgr3 | ||||||||
Sheet1 |
On Worksheet2, I set up a Validation list. When I choose a month, I want that corresponding information to filter on Worksheet2 and list the Employees with the same Mgr's ID.
Book2 | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Month | Mar | ||||||
2 | Mgr1 | Mgr2 | Mgr3 | |||||
3 | Name | GroupID | Name | GroupID | Name | GroupID | ||
4 | Employee01 | Group1 | Employee05 | Group2 | Employee03 | Group3 | ||
5 | Employee02 | Group1 | Employee08 | Group2 | Employee06 | Group3 | ||
6 | Employee04 | Group1 | Employee11 | Group2 | Employee07 | Group3 | ||
7 | Employee10 | Group1 | Employee14 | Group2 | Employee09 | Group3 | ||
8 | Employee13 | Group1 | Employee15 | Group2 | Employee12 | Group3 | ||
9 | Employee16 | Group3 | ||||||
10 | ||||||||
11 | ||||||||
12 | ||||||||
13 | ||||||||
14 | ||||||||
15 | ||||||||
Sheet2 |
Yes...I know I could Auto Filter it, and then copy and paste it to a separate worksheet, but what's the fun in that if you can automate it! Keep in mind that new Mgrs could be added.
Thanks!
:D