vlookup twice in one formula

caritx

New Member
Joined
Dec 1, 2009
Messages
34
i have a file and in in column A I have data. I need to do a vlookup in "Tab1" to and if there is a value to return it. If the value is not there then check "Tab2" and bring back the value.

Now the problem is that the value might be in both but I always want the "tab1" value before it goes to "tab2".

Can someone help?

I tried this but it would go to "tab2" and ignore "tab1"

=LOOKUP(REPT("z",255),CHOOSE({1,2,3,4}," ", VLOOKUP(AL2,tab1!$A$1:$B45870,2,0),VLOOKUP(AL2,tab2!A2:D1209,4,FALSE)))
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Try

=IF(ISNA(VLOOKUP(AL2,tab1!$A$1:$B45870,2,0)),VLOOKUP(AL2,tab2!A2:D1209,4,0),VLOOKUP(AL2,tab1!$A$1:$B45870,2,0))
 
Upvote 0
Try

=if(isna(VLOOKUP(AL2,tab1!$A$1:$B45870,2,0)),VLOOKUP(AL2,tab2!$A$1:$B45870,2,0),VLOOKUP(AL2,tab1!$A$1:$B45870,2,0))
 
Upvote 0

Forum statistics

Threads
1,215,779
Messages
6,126,850
Members
449,345
Latest member
CharlieDP

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