Problem to Team List

gimran

New Member
Joined
Dec 15, 2011
Messages
33
hey every one,

I have a team list where each team has around 12 -17 members. Now using Data Validation I have put the team name in a single cell. Now what i want to do is when ill select a team from the list, i want the team members info in the below table.
 
Last edited:

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Sorry not working.......Having name error "#NAME?"

Any other solution?
Ok...

If you setup your team list like this:

Book1
AB
1TeamName
2Team1Sue
3Team1Bill
4Team1Lisa
5Team2Eric
6Team2Paul
7Team2Trish
8Team2Carol
9Team3Pete
10Team3Don
11Team3Tim
12Team3Lee
13Team3Karen
14Team3Frank
15Team3Nancy
Sheet1

Then, with a drop down list in cell D2...

Book1
ABCDEF
1TeamName_TeamCountName
2Team1Sue_Team24Eric
3Team1Bill___Paul
4Team1Lisa___Trish
5Team2Eric___Carol
6Team2Paul____
7Team2Trish____
8Team2Carol____
9Team3Pete____
10Team3Don____
11Team3Tim____
12Team3Lee____
13Team3Karen____
14Team3Frank____
15Team3Nancy____
Sheet1

Enter this formula in E2. This will return the count of records for the team selected from the drop down list.

=COUNTIF(A2:A15,D2)

Enter this formula in F2 to return the team member names:

=IF(ROWS(F$2:F2)>E$2,"",INDEX(B:B,MATCH(D$2,A:A,0)+ROWS(F$2:F2)-1))

Copy down until you get blanks.
 
Upvote 0
Ok...

If you setup your team list like this:

Book1
*AB
1TeamName
2Team1Sue
3Team1Bill
4Team1Lisa
5Team2Eric
6Team2Paul
7Team2Trish
8Team2Carol
9Team3Pete
10Team3Don
11Team3Tim
12Team3Lee
13Team3Karen
14Team3Frank
15Team3Nancy
Sheet1

Then, with a drop down list in cell D2...

Book1
*ABCDEF
1TeamName_TeamCountName
2Team1Sue_Team24Eric
3Team1Bill___Paul
4Team1Lisa___Trish
5Team2Eric___Carol
6Team2Paul____
7Team2Trish____
8Team2Carol____
9Team3Pete____
10Team3Don____
11Team3Tim____
12Team3Lee____
13Team3Karen____
14Team3Frank____
15Team3Nancy____
Sheet1

Enter this formula in E2. This will return the count of records for the team selected from the drop down list.

=COUNTIF(A2:A15,D2)

Enter this formula in F2 to return the team member names:

=IF(ROWS(F$2:F2)>E$2,"",INDEX(B:B,MATCH(D$2,A:A,0)+ROWS(F$2:F2)-1))

Copy down until you get blanks.


Thanks for the help. This one is rather easy to understand. If possible please explain the previous array formula how it is actually working.
 
Upvote 0
Thanks for the help. This one is rather easy to understand. If possible please explain the previous array formula how it is actually working.
=IF(ROWS(F$2:F2)>E$2,"",INDEX(Value,SMALL(IF(Item=D$2,ROW(Item)),ROWS(F$2:F2))))

The IF function tests the range for the criteria and if it is found it returns the row number.

The row numbers are passed to the SMALL function which are in turn passed to the INDEX function to tell it where to find the results.

When the formula is copied down a column the SMALL function passes the nth smallest row number to the INDEX function. This returns the data in the order in which it was found.
 
Upvote 0
=IF(ROWS(F$2:F2)>E$2,"",INDEX(Value,SMALL(IF(Item=D$2,ROW(Item)),ROWS(F$2:F2))))

The IF function tests the range for the criteria and if it is found it returns the row number.

The row numbers are passed to the SMALL function which are in turn passed to the INDEX function to tell it where to find the results.

When the formula is copied down a column the SMALL function passes the nth smallest row number to the INDEX function. This returns the data in the order in which it was found.


Thanks a lot....I need to learn a lot of things in excel.
 
Upvote 0

Forum statistics

Threads
1,223,711
Messages
6,174,029
Members
452,542
Latest member
Bricklin

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