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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
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,497
Messages
6,125,158
Members
449,208
Latest member
emmac

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