Imagine this test scenario...
In Columns A and B I have the values
Column A Column B
Foreman, George 2
Bloggs, Joe 3
Bond, James 4
and in cell G1 I have the value
2
If I use the VLOOKUP function like this
=VLOOKUP(G1,A:B,2,FALSE)
I will get the
#N/A
result. The clue is in the tooltip for
VLOOKUP
(the bold is from me) ...
Quote:
Looks for a values in the leftmost column of a table, and then returns a value in the same row from a column you specify. By default, the tale must be sorted in an ascending order.
There are a couple of ways around your problem...
1. Reverse the order of your columns
Column A Column B
2 Foreman, George
3 Bloggs, Joe
4 Bond, James
Then the formula to use is
=VLOOKUP(G1,A:B,2,FALSE)
2. Drag a formula down column C
=A1
Then the forumula to use is
=VLOOKUP(G1,B:C,2,FALSE)
You can always hide column C if you want to keep the original "look" of the spreadsheet