SOLVED

Matching Help

Copper Contributor

Hi Everyone,

 

I have two columns of data, column A has a list of numbers, and column B has a list of names.

 

Each number will correspond with the persons name. The excel sheet is being used for an athletics race so each number represents an athlete. 

When creating a table for the fastest runner, is there a formula I can use which when I type in the runner number, the cell to the right in the next column would fill in their name automatically depending on which number I enter? 

 

I’m not sure if this would be an INDEX, MATCH, VLOOKUP etc. Any help would be much appreciated! 

2 Replies
best response confirmed by GrantAllison (Copper Contributor)
Solution

@GrantAllison 

=IFERROR(VLOOKUP(D2,$A$2:$B$18,2,FALSE),"")
=IFERROR(INDEX($B$2:$B$18,MATCH(D2,$A$2:$A$18,0)),"")

If the numbers are in range A2:A18 and the names are in range B2:B18 and you want to enter the numbers in cell D2, D3, D4 and so on you can enter any of these formulas in cell E2. The formula can be filled down as required. If a numbers doesn't exist in range A2:A18 the formula returns an empty cell.

numbers and names.JPG

 

@OliverScheurich 

 

Thank you kindly! This is exactly what I was after! Much appreciated. 

1 best response

Accepted Solutions
best response confirmed by GrantAllison (Copper Contributor)
Solution

@GrantAllison 

=IFERROR(VLOOKUP(D2,$A$2:$B$18,2,FALSE),"")
=IFERROR(INDEX($B$2:$B$18,MATCH(D2,$A$2:$A$18,0)),"")

If the numbers are in range A2:A18 and the names are in range B2:B18 and you want to enter the numbers in cell D2, D3, D4 and so on you can enter any of these formulas in cell E2. The formula can be filled down as required. If a numbers doesn't exist in range A2:A18 the formula returns an empty cell.

numbers and names.JPG

 

View solution in original post