MATCH using the first value found and skipping all the rest

RonOliver

Board Regular
Joined
Aug 30, 2022
Messages
82
Office Version
  1. 365
Platform
  1. Windows
Hi. Posting my sheet:

STUDENTSSCORES
Student 18
Student 27Student 8
Student 39
Student 45
Student 57
Student 6
Student 73
Student 89
Student 96


In D3 I've done data validation with a list of students in column A. I want D4 to award a gold medal (the first image function) to all student who got the top score. a silver one to whomever got the second highest score and a bronze one to whomever got the third highest score. The problem with my formula is it will only give the medal to the first person in the list with the top score, so if I choose a student with the same score, it will show me no medal.

Seems like an easy problem, but I've tried all sorts of things (including a combination of UNIQUE, SORT, CHOOSEROWS, etc) and I can't get it to do what I'd like for it to do. Thanks!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I don't know if the formula was posted correctly, but the formula in D4 is this:
Excel Formula:
=IF(D3=INDEX(A2:A10,MATCH(LARGE(B2:B10,1),B2:B10,0)),IMAGE("https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Zlatna_medalja.png/640px-Zlatna_medalja.png"),IF(D3=INDEX(A2:A10,MATCH(LARGE(B2:B10,2),B2:B10,0)),IMAGE("https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Srebrna_medalja.png/640px-Srebrna_medalja.png"),IF(D3=INDEX(A2:A10,MATCH(LARGE(B2:B10,3),B2:B10,0)),IMAGE("https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Bronzana_medalja.png/640px-Bronzana_medalja.png"),"")))
 
Upvote 0
How about
Excel Formula:
=IFERROR(CHOOSE(RANK(INDEX(B2:B10,MATCH(D3,A2:A10,0)),B2:B10),IMAGE("https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Zlatna_medalja.png/640px-Zlatna_medalja.png"),IMAGE("https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Srebrna_medalja.png/640px-Srebrna_medalja.png"),IMAGE("https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Bronzana_medalja.png/640px-Bronzana_medalja.png")),"")
 
Upvote 1
Solution
How about
Excel Formula:
=IFERROR(CHOOSE(RANK(INDEX(B2:B10,MATCH(D3,A2:A10,0)),B2:B10),IMAGE("https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Zlatna_medalja.png/640px-Zlatna_medalja.png"),IMAGE("https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Srebrna_medalja.png/640px-Srebrna_medalja.png"),IMAGE("https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Bronzana_medalja.png/640px-Bronzana_medalja.png")),"")
That works! Thanks very much!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 1

Forum statistics

Threads
1,215,095
Messages
6,123,072
Members
449,093
Latest member
ripvw

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