The countries are ranked in order based on the medals the country has won in races. The best country has won more gold medals than other countries. The countries which did not win any gold medals are ranked based on how many silver medals they got. The countries which did not win any gold or silver medals are listed by the number of their bronze medals.
If country won one gold medal is that country ranked higher than a country which won 10 silver medals but no gold medals.

G, S and B stand for gold, silver and bronze, just for clarification.
We need to create a reference number for all the countries, the reference number depends on the number of medals the country achieved.
The number of gold medals is multiplied by 1000 and number of silver medals by 100. Then number of bronze medals is added.

Country A won nine gold medals, six silver medals and eight gold medals. Therefore, the reference number for the country A is 8 * 1000 + 6 * 100 + 8= 9608.

Then we can rank the countries, so that number one is the best country.
In our case, function RANK.EQ holds just two arguments. Number, which is ranked, and reference numbers to which the number is compared. The third argument, order, is also possible. In this case, it is not needed. If we wanted to rank the last country as one, we would just enter 1 as order.
Finally, we could set up a podium. We mark 1, 2, and 3. Then Excel should look for us to decide which country is the first, second or third.
For that, we need two functions INDEX and MATCH. I will introduce the functions.

For INDEX the area B2:E4 is defined first. Row selection is three, meaning we take the third row in the area, meaning row starting with nine. Column selection two means that we take the second value from that row, that is ten.

We have lookup value in B2 and lookup array from B4 to B8. Match type is zero, we are looking for the exact match, sharp two. The number two is the fourth number is the array.

First, we need to use MATCH function to find out that number one is the third number in I4:I13 array. Then we take the third country from C4:C14.

The sentence in L4 is:
=INDEX($C$4:$C$13; MATCH(K4;$I$4:$I$13;0))


