VLOOKUP and IF

EMY245

New Member
Joined
Aug 6, 2013
Messages
20
Hello,

I am trying to use the VLOOKUP function whereby it will firstly lookup the value in cell A1 in 'sheet2' and display a column, but if it cannot find a match, i then want it lookup the same value in 'sheet3'.

I am struggling with the formula for this - whether to use =IF(ISERROR(VLOOKUP.... and in which order it needs to be displayed.

Appreciate any help!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
This is the formula needed - replace the ranges A1:B11 with your desired ones as necessary.

=IF(ISNA(VLOOKUP(A1,Sheet2!A1:B11,2,FALSE)),VLOOKUP(A1,Sheet3!A1:B11,2,FALSE),VLOOKUP(A1,Sheet2!A1:B11,2,FALSE))
 
Upvote 0
You are very welcome, glad to have been of help.

For completeness, I should also have said to replace the column number (2 in my example) with the column number you are trying to retrieve, but it looks like you worked that out anyway.
 
Upvote 0

Forum statistics

Threads
1,216,030
Messages
6,128,418
Members
449,449
Latest member
Quiet_Nectarine_

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