VLOOKUP #REF! error (noob)

itm

New Member
Joined
Mar 20, 2010
Messages
9
I have a VLOOKUP function which gives the #REF! error if the column referenced by col_index is anything other than 1.

For example, in the example below (where the first column is A and the first row 1) the following function gives #REF!:
=VLOOKUP(A1,A3:A5,2,FALSE)

X #REF!

X 1
Y 2
Z 3

The function below works fine however, returning the value of the first column:
=VLOOKUP(A1,A3:A5,1,FALSE)

Can anyone tell me what I'm doing wrong? The cell format for all cells is "General"
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome to the MrExcel board!

If you are trying to look up the second column, then your lookup range needs to be at least 2 columns wide, not 1. Try

=VLOOKUP(A1,A3:B5,2,FALSE)
 
Upvote 0

Forum statistics

Threads
1,215,516
Messages
6,125,286
Members
449,218
Latest member
Excel Master

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