Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Andy M
 
Posts: n/a
Default find maximum of two values in an array with same lookup value

Table containing team names and members of teams of two and their scores in a
number of competitions. Require to return the highest scorer for each team.
Can use vlookup to return one of the records for a team though not
necessarily the team member with highest score. Can't sort the array by
descending order of points scored because the highest scorere for any given
team will not be the same in every competition. Could probably think of a
way of doing this by writing some VBA but if anyone can think of some way of
avoiding that.....all ideas welcome
  #2   Report Post  
Barb R.
 
Posts: n/a
Default

How is the data listed in the spreadsheet now? Can you give an example?

"Andy M" wrote:

Table containing team names and members of teams of two and their scores in a
number of competitions. Require to return the highest scorer for each team.
Can use vlookup to return one of the records for a team though not
necessarily the team member with highest score. Can't sort the array by
descending order of points scored because the highest scorere for any given
team will not be the same in every competition. Could probably think of a
way of doing this by writing some VBA but if anyone can think of some way of
avoiding that.....all ideas welcome

  #3   Report Post  
bj
 
Posts: n/a
Default

Are you looking for the highest total score for all competitions, the highest
score in any competition or the highest score for an individual competition
seen by the team?

do you want an indication there is a tie if one is present?

"Andy M" wrote:

Table containing team names and members of teams of two and their scores in a
number of competitions. Require to return the highest scorer for each team.
Can use vlookup to return one of the records for a team though not
necessarily the team member with highest score. Can't sort the array by
descending order of points scored because the highest scorere for any given
team will not be the same in every competition. Could probably think of a
way of doing this by writing some VBA but if anyone can think of some way of
avoiding that.....all ideas welcome

  #4   Report Post  
Andy M
 
Posts: n/a
Default

Data arranged something like

Game 1 Game 2 Game 3
Team 1 Player 1 123 134 101
Team 1 Player 2 132 150 90
Team 2 Player 3 102 150 105
Team 2 Player 4 95 149 107

For each game I want to be able to locate the highest score recorded by
whichever team member, so in another table i'm looking for

Game 1 Game 2 Game 3
Team 1 132 150 101
Team 2 102 150 107

where the game scores in the "team only" table are the higher of the two
results recorded by that teams players. You can assume a tie between players
in the same team is not possible.


"Barb R." wrote:

How is the data listed in the spreadsheet now? Can you give an example?

"Andy M" wrote:

Table containing team names and members of teams of two and their scores in a
number of competitions. Require to return the highest scorer for each team.
Can use vlookup to return one of the records for a team though not
necessarily the team member with highest score. Can't sort the array by
descending order of points scored because the highest scorere for any given
team will not be the same in every competition. Could probably think of a
way of doing this by writing some VBA but if anyone can think of some way of
avoiding that.....all ideas welcome

  #5   Report Post  
Andy M
 
Posts: n/a
Default

Please refer to response to barb R - hopefully this makes it (a little)
clearer ?!

"bj" wrote:

Are you looking for the highest total score for all competitions, the highest
score in any competition or the highest score for an individual competition
seen by the team?

do you want an indication there is a tie if one is present?

"Andy M" wrote:

Table containing team names and members of teams of two and their scores in a
number of competitions. Require to return the highest scorer for each team.
Can use vlookup to return one of the records for a team though not
necessarily the team member with highest score. Can't sort the array by
descending order of points scored because the highest scorere for any given
team will not be the same in every competition. Could probably think of a
way of doing this by writing some VBA but if anyone can think of some way of
avoiding that.....all ideas welcome



  #6   Report Post  
Andy M
 
Posts: n/a
Default


I think I've got this - if I create a hidden column (to the left) of the
team and player names which contains a concatenation of Team and Player
I can then create tables elsewhere in the work book something like this.

A B C D
1 Team 1 Player 1 Player 2 =max(vlookup(A1&B1,<lookup
range
name,<column
offset,true),vlookup(A1&C1,<lookup range name,<column offset,true))

which I think does the job!!

Thanks to those who gave it some thought!


"Andy M" wrote:

Table containing team names and members of teams of two and their scores in a
number of competitions. Require to return the highest scorer for each team.
Can use vlookup to return one of the records for a team though not
necessarily the team member with highest score. Can't sort the array by
descending order of points scored because the highest scorere for any given
team will not be the same in every competition. Could probably think of a
way of doing this by writing some VBA but if anyone can think of some way of
avoiding that.....all ideas welcome

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count how many different text values in an array. OVERLOAD Excel Worksheet Functions 3 April 14th 05 05:12 PM
How do you find the difference between two time values when one i. tubroh730 Excel Discussion (Misc queries) 1 March 25th 05 05:32 PM
in excel, how do I find which values doesn't have a pair? jackies_place Excel Discussion (Misc queries) 2 December 17th 04 06:43 PM
To find different values in Col B corresp. to repeated vaues in c K.S.Warrier Excel Worksheet Functions 7 December 10th 04 11:57 AM
Keeping Array values? MJSlattery Excel Worksheet Functions 0 November 5th 04 09:25 PM


All times are GMT +1. The time now is 02:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"