IF statement w/ 2 Vlookups

kal8v9

New Member
Joined
Feb 20, 2009
Messages
9
Hi-

I need help. I have a IF statement and I want 2 vlookups in it. It says this =IF(AB18="Outbound",VLOOKUP(A18,'Shipper Number'!$A$1:$E$17,4,FALSE),VLOOKUP(K3,Plants!$B$1:C$5,2,FALSE)). Well the first vlookup is returning a #N/A. I want the statement to read if the cell reads outbound look at shipper number and return #, but if the shipper number doesn't match look at tab plants and return plant number. The first vlookup is returning a #N/A and it is causing the 2nd vlookup not to work.

Hope that sounds ok, and you can understand it.

Thanks,
Kelly
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
use a isna() function to check first. so

=IF(AB18="Outbound",IF(ISNA(VLOOKUP(A18,'Shipper Number'!$A$1:$E$17,4,FALSE)),VLOOKUP(K3,Plants!$B$1:C$5,2,FALSE)),VLOOKUP(A18,'Shipper Number'!$A$1:$E$17,4,FALSE))

So now if the first returns #NA it does the second, if it does not return #NA it shows the result
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

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