# RANK and XLOOKUP in Excel: using these in spreadsheets

## RANK and XLOOKUP – how can I use both of these my worksheets?​

This week’s hint and tip is about the functions RANK and XLOOKUP in Excel and how you can use them in your worksheets. In this hint and tip we are showing you how you can use Excel for sporting and other competitions. The XLOOKUP function is covered in our Master Class Excel Silver training course but the RANK one isn’t. As this example of both functions isn’t in any of our courses, we decided to do a hint and tip on it. We are going to go through it now below.

#### Using RANK and XLOOKUP together in a spreadsheet

Some of you may know that John, our main trainer, takes part in triathlons and is a member of a local club. So this Excel workbook shows how we store the times for each of the 3 disciplines (Swim, Cycle, Run) and then allocate medals according to position.

We use the RANK and XLOOKUP function to achieve this and format cells as times in hours minutes and seconds as appropriate. As well as this named ranges are also used for the times per discipline.

#### Pointers to look out for in the video

Key features used are:

• Named ranges are an alternative to using \$ signs. They are created in the Name Box (above column A) but edited via Name Manager on the Formulas Tab
• The RANK formula has 3 arguments: cell reference, named range and numeric value of 1 (ascending)
• XLOOKUP is used to get the medal allocated and has the advantage over VLOOKUP of having the matched value not necessarily in column1 (here is the 2nd column we are matching to and picking up the medal from the 1st column)