Multiple Vlookups in If then statement

uamdb1978

New Member
Joined
Aug 17, 2020
Messages
2
Office Version
  1. 2010
I need to pull information from the Description column from a row of data. People will be searching using either a "Part number" or an "Internal Part Number". I want the if then to perform a Vlookup looking for the part number. If the part number is valid give the Description. If the Part number is invalid to perform a Vlookup using the Internal part number.

I have the formula written but I cannot figure out what to use in the if then for the value not found (#N/A). Any suggestions? Below is the formula and the table.

Thanks in advance

David

=IF(VLOOKUP(A15,F5:H10,2,FALSE)="#n/a",VLOOKUP(A15,F5:H10,3,FALSE),VLOOKUP(A15,F5:H10,3,FALSE))


PartIDInternal IDDescription
1​
aTest
2​
bTest1
3​
cTest2
4​
dTest3
5​
eTest4
 

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
Try

=IFERROR(IFERROR(VLOOKUP(A15,$G$5:$H$10,2,FALSE),VLOOKUP(A15,$F$5:$H$10,3,FALSE)),"No Match")
 
Upvote 0
Assuming A15 is where you enter the "Part ID" or "Internal ID"....
VBA Code:
=IFNA(IFNA(VLOOKUP(A15,$F$5:$H$10,3,FALSE),VLOOKUP(A15,$G$5:$H$10,2,FALSE)),"None")
 
Upvote 0

Forum statistics

Threads
1,214,587
Messages
6,120,406
Members
448,958
Latest member
Hat4Life

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