Please Help! If statement combined with vlookup.

bkoeni3

New Member
Joined
Jul 6, 2007
Messages
14
I am trying to create a vlookup off of two different spreadsheets. If the source is not on one spreadsheet, it is on the other sheet. I think I should be using some type of ISNA or ISERROR Formula, but nothing I try works. Here is what I need to happen.

1. I want to do a vlookup off spreadsheet #1.

2. If the information is not available on spreadsheet one (meaning the formula should return an #N#A, I want to do a vlookup off of spreadsheet #2.

Can anyone provide me with the formula that would allow me to do this? Thanks in advance!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Lewiy

Well-known Member
Joined
Jan 5, 2007
Messages
4,284
Try something like this:
Code:
=IF(ISNA(VLOOKUP(value,sheet1!range,column,type)),VLOOKUP(value,sheet2!range,column,type),VLOOKUP(value,sheet1!range,column,type))

Or you could also use COUNTIF as the orginal test to see if the value is in sheet1 to make the formula slightly shorter.
 
Upvote 0

Forum statistics

Threads
1,191,025
Messages
5,984,202
Members
439,877
Latest member
kellylet

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
Top