Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Looking up a value next to a designated cell

I have a worksheet with names of sports along row 1. In row 2 there are
scores [out of 25] for each sport. To the right of this table I need to find
the sport with the highest score, 2nd, 3rd highest, etc. To do the ranking I
am using =LARGE(A2:J2,1). The final argument is changed to 2 or 3 to achieve
the ranking and works acceptably even if 2 sports have the same score.

My problem is that I also need to know which sport achieved the highest
score. Lets say the cell showing the highest score in the area to the right
is cell M2. I can do this using the Hlookup function if I duplicate the
headings A1:J1 and paste them below the scores [say A3:J3] -
=hlookup(M2,A2:J2,2,false). The problem with this method is that there are
often 2 sports with the same score €“ lets say basketball and hockey both
have a score of 23. For the highest score the function finds 23 in M2 and
returns €śBasketball€ť as the first instance in the table. The 2nd highest
result [in O2] then also finds €śbasketball€ť.

Ive experimented with Cell, Offset and combinations/nested variations of
these with Lookup and Large but to no avail. Is there a better way to achieve
what I want?

--
G.King
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Looking up a value next to a designated cell

One simple play with a tiebreaker to deliver the desired results

Assume source data within A1:C2
where A1:C1 = sports, A2:C2 = scores

In E3: =IF(A2="","",A2-COLUMN()/10^10)
This is the criteria row, with tiebreaker

In E1:
=INDEX($A1:$C1,MATCH(LARGE($E$3:$G$3,COLUMNS($A:A) ),$E$3:$G$3,0))
Copy down to E2. Select E1:E3, copy across to G3. Min/hide row3. The
descending auto-sort results of the source data will appear in E1:G3. Ties,
if any, will appear in the same relative order that they are within the
source data. Adapt to suit.

Success? Celebrate it, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"g.king" wrote:
I have a worksheet with names of sports along row 1. In row 2 there are
scores [out of 25] for each sport. To the right of this table I need to find
the sport with the highest score, 2nd, 3rd highest, etc. To do the ranking I
am using =LARGE(A2:J2,1). The final argument is changed to 2 or 3 to achieve
the ranking and works acceptably even if 2 sports have the same score.

My problem is that I also need to know which sport achieved the highest
score. Lets say the cell showing the highest score in the area to the right
is cell M2. I can do this using the Hlookup function if I duplicate the
headings A1:J1 and paste them below the scores [say A3:J3] -
=hlookup(M2,A2:J2,2,false). The problem with this method is that there are
often 2 sports with the same score €“ lets say basketball and hockey both
have a score of 23. For the highest score the function finds 23 in M2 and
returns €śBasketball€ť as the first instance in the table. The 2nd highest
result [in O2] then also finds €śbasketball€ť.

Ive experimented with Cell, Offset and combinations/nested variations of
these with Lookup and Large but to no avail. Is there a better way to achieve
what I want?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Looking up a value next to a designated cell

Sorry, I've been away for a few days. This helps enormously.
Many thanks!
--
G.King


"Max" wrote:

One simple play with a tiebreaker to deliver the desired results

Assume source data within A1:C2
where A1:C1 = sports, A2:C2 = scores

In E3: =IF(A2="","",A2-COLUMN()/10^10)
This is the criteria row, with tiebreaker

In E1:
=INDEX($A1:$C1,MATCH(LARGE($E$3:$G$3,COLUMNS($A:A) ),$E$3:$G$3,0))
Copy down to E2. Select E1:E3, copy across to G3. Min/hide row3. The
descending auto-sort results of the source data will appear in E1:G3. Ties,
if any, will appear in the same relative order that they are within the
source data. Adapt to suit.

Success? Celebrate it, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"g.king" wrote:
I have a worksheet with names of sports along row 1. In row 2 there are
scores [out of 25] for each sport. To the right of this table I need to find
the sport with the highest score, 2nd, 3rd highest, etc. To do the ranking I
am using =LARGE(A2:J2,1). The final argument is changed to 2 or 3 to achieve
the ranking and works acceptably even if 2 sports have the same score.

My problem is that I also need to know which sport achieved the highest
score. Lets say the cell showing the highest score in the area to the right
is cell M2. I can do this using the Hlookup function if I duplicate the
headings A1:J1 and paste them below the scores [say A3:J3] -
=hlookup(M2,A2:J2,2,false). The problem with this method is that there are
often 2 sports with the same score €“ lets say basketball and hockey both
have a score of 23. For the highest score the function finds 23 in M2 and
returns €śBasketball€ť as the first instance in the table. The 2nd highest
result [in O2] then also finds €śbasketball€ť.

Ive experimented with Cell, Offset and combinations/nested variations of
these with Lookup and Large but to no avail. Is there a better way to achieve
what I want?


  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Looking up a value next to a designated cell

"g.king" wrote:
Sorry, I've been away for a few days. This helps enormously.
Many thanks!


That's good. You're welcome. If you can, do spare a moment to click the YES
button (like the one below) in that response.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
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
No printing of b/w designated cell patterns WIN Excel Discussion (Misc queries) 1 June 10th 08 01:15 AM
Excel, function, result to be returned in another designated cell EXCEL WORKSHEET FUNCTIONS Excel Worksheet Functions 3 July 21st 06 06:24 PM
Text that includes data from a designated cell? Blades Excel Discussion (Misc queries) 2 June 27th 06 01:07 PM
Vlookup based on designated occurrence of value bill9340 Excel Worksheet Functions 4 November 3rd 05 07:02 PM
Count designated cells VB Excel Worksheet Functions 1 August 3rd 05 02:25 AM


All times are GMT +1. The time now is 08:04 AM.

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

About Us

"It's about Microsoft Excel"