MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 23rd, 2002, 11:11 AM   #1
mykdogg241
New Member
 
Join Date: Mar 2002
Posts: 3
Default

I have a list of basketball players and their stats(points,reb,ast,steals,etc.)
On sheet2 I want to have the 'leaders'(points leader,reb leader). I can determine this easy enough(MAX()) but how do I then associate the number with the player automatically as the totals change?
example:
POINTS LEADER
name 1,000 points
mykdogg241 is offline   Reply With Quote
Old Mar 23rd, 2002, 11:37 AM   #2
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
On 2002-03-23 10:11, mykdogg241 wrote:
I have a list of basketball players and their stats(points,reb,ast,steals,etc.)
On sheet2 I want to have the 'leaders'(points leader,reb leader). I can determine this easy enough(MAX()) but how do I then associate the number with the player automatically as the totals change?
example:

POINTS LEADER
name 1,000 points
Hi mykdogg241:
What do you mean by associating the numbers with the players ... your calculation of maximum scores will be fed from the players stats anyway ... a little clarification of what you are trying to do ... and then let us take it from there!
__________________
Regards!

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
www.energyefficientbuild.com
Yogi Anand is offline   Reply With Quote
Old Mar 23rd, 2002, 12:09 PM   #3
mykdogg241
New Member
 
Join Date: Mar 2002
Posts: 3
Default

example: 3 columns
players pts reb
john 20 5
steve 30 7
ralph 40 2


on sheet2 I can determine the highest point total on column 2"pts" = 40 MAX(B2:B4)
How do I also associate ralph with his 40 points automatically so it looks like this:
POINTS LEADER
Ralph 40
Say the totals were updated so john has 50 points, sheet2 should automatically change to
POINTS LEADER
John 50
mykdogg241 is offline   Reply With Quote
Old Mar 23rd, 2002, 12:33 PM   #4
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
On 2002-03-23 11:09, mykdogg241 wrote:
example: 3 columns
players pts reb
john 20 5
steve 30 7
ralph 40 2


on sheet2 I can determine the highest point total on column 2"pts" = 40 MAX(B2:B4)
How do I also associate ralph with his 40 points automatically so it looks like this:
POINTS LEADER
Ralph 40
Say the totals were updated so john has 50 points, sheet2 should automatically change to
POINTS LEADER
John 50
Hi mykdogg241:
Here is the formula ...
="Points Leader "&UPPER(INDEX(A2:A4,MATCH(MAX(B2:B4),B2:B4,0),1))&" "&MAX(B2:B4)

The MATCH function computes the row number in which the associated max score of 40 lies --
The index function then uses the row number found by the MATCH function to zero in on RALPH

if you then change John's score to 50, it gives:

Points Leader JOHN 50

HTH

Please post back if it works for you ... otherwise explain a little further and let us take it from there!

_________________
Regards!
Yogi Anand

Modified hard coded signature to Edit out inactive website

[ This Message was edited by: Yogi Anand on 2003-01-19 12:35 ]
Yogi Anand is offline   Reply With Quote
Old Mar 23rd, 2002, 01:06 PM   #5
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
Default

Quote:
On 2002-03-23 11:09, mykdogg241 wrote:
example: 3 columns
players pts reb
john 20 5
steve 30 7
ralph 40 2


on sheet2 I can determine the highest point total on column 2"pts" = 40 MAX(B2:B4)
How do I also associate ralph with his 40 points automatically so it looks like this:
POINTS LEADER
Ralph 40
Say the totals were updated so john has 50 points, sheet2 should automatically change to
POINTS LEADER
John 50
That's the easy part: the trouble is that you can have more names who have the MAX value as their score. What follows is going to sound complicated, but it should do what you want.

In Sheet1 we have the sample data (with one more row added) you provided in A1:C5.
Take notice that the actual data starts at row 2.

In Sheet2:

in A2 enter:

=MATCH(9.99999999999999E+307,Sheet1!B:B)-ROW(Sheet1!1:1)

in B2 enter:

=MAX(OFFSET(Sheet1!B2,0,0,A2,1))

You can hide columns A and B, if desired.

In C2 enter:

=IF($B$2,INDEX(OFFSET(Sheet1!$A$2,0,0,$A$2,1),MATCH($B$2,OFFSET(Sheet1!$B$2,0,0,$A$2,1),0)),"")

in C3 enter and drag down untill no more names appear:

=IF(AND($B$2,COUNTIF(OFFSET(Sheet1!$B$2,0,0,$A$2,1),$B$2)>COUNTA($C$2:C2)),INDEX(OFFSET(Sheet1!$A$2,MATCH(C2,OFFSET(Sheet1!$A$2,0,0,$A$2,1),0),0,$A$2,1),MATCH($B$2,OFFSET(Sheet1! $B$2,MATCH(C2,OFFSET(Sheet1!$A$2,0,0,$A$2,1),0),0,$A$2,1),0)),"")

That's the result we get:

{"ralph";
"aladin"}

Aladin



[ This Message was edited by: Aladin Akyurek on 2002-03-23 12:08 ]
Aladin Akyurek is offline   Reply With Quote
Old Mar 23rd, 2002, 01:13 PM   #6
mykdogg241
New Member
 
Join Date: Mar 2002
Posts: 3
Default

Works great! Thanks
mykdogg241 is offline   Reply With Quote
Old Mar 23rd, 2002, 01:22 PM   #7
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

Quote:
On 2002-03-23 11:09, mykdogg241 wrote:
example: 3 columns
players pts reb
john 20 5
steve 30 7
ralph 40 2


on sheet2 I can determine the highest point total on column 2"pts" = 40 MAX(B2:B4)
How do I also associate ralph with his 40 points automatically so it looks like this:
POINTS LEADER
Ralph 40
Say the totals were updated so john has 50 points, sheet2 should automatically change to
POINTS LEADER
John 50
If you are trying to use only one dataset and find the individual leaders as game totals are added (i.e John 20 pts 1st game, 30 pts second), then it will be exceedingly difficult, unless I am missing something obvious.

Names in col A, Pts in column B, this returns the leading scorer:

=MAX(SUMIF(A1:A15,"John",B1:B15),SUMIF(A1:A15,"Ralph",B1:B15),SUMIF(A1:A15,"Steve",B1:B15))

More names and this will get very long. Named formulas might help.

My recommendation would be to carry two tables. One is the player roster, where you can grab all the individual stats in that table by referencing the data set (the second table).

Then, The leader columns can be determined from the player table.

By the way, what's with Ralph? 40 points and only two rebounds? Only a gunner? I hope he plays some defense.

Bye,
Jay
Jay Petrulis is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 06:59 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes