IFNA nested into an if statement w/ a vlookup also nested

hmsmith54

New Member
Joined
Jul 20, 2015
Messages
19
I have an if statement to tell me if there is a specific value "CAD" and if it equals CAD to do a vlookup to pull in a dollar amount based on a value in another cell. This I have working fine, however, I need to go one step further and if the error #N/A comes up I need it to pull in a 0.

This is my beginning formula

=IF(G2="CAD",VLOOKUP(C2,INVOICE,5,FALSE), "Not CAD ")

I do not know where (or if it is even possible) to add an if iserror or and IFNA statement to pull in 0.

Any help would be greatly appreciated!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
=if(isna(IF(G2="CAD",VLOOKUP(C2,INVOICE,5,FALSE), "Not CAD ")),0,IF(G2="CAD",VLOOKUP(C2,INVOICE,5,FALSE), "Not CAD "))
 
Upvote 0
=if(isna(IF(G2="CAD",VLOOKUP(C2,INVOICE,5,FALSE), "Not CAD ")),0,IF(G2="CAD",VLOOKUP(C2,INVOICE,5,FALSE), "Not CAD "))

i know this is an old post but my formula is very similar with a similar issue, but instead of putting a 0 value in the cell i would like to vlookup a different range if #N/A

=IF(Q4="Yes",VLOOKUP(W4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),"Non WH Error")


eg
=IF(Q4="Yes",VLOOKUP(W4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),"Non WH Error") = #N/A then VLOOKUP(X4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),"Non WH Error")

i hope this makes sense.
 
Upvote 0
try

Code:
=IF(Q4="Yes",IFERROR(VLOOKUP(W4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),VLOOKUP(X4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE)),"Non WH Error")
 
Upvote 0
try

Code:
=IF(Q4="Yes",IFERROR(VLOOKUP(W4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),VLOOKUP(X4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE)),"Non WH Error")

yes that works :)

I have so many varibles in my data its crazy, the above works for 90% of my data but i have an issue, can i add another vlookup in there?

eg.

=IF(Q4="Yes",IFERROR(VLOOKUP(W4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),VLOOKUP(X4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE)),"Non WH Error") IF result = "system" then VLOOKUP(Y4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE)),"Non WH Error")

thanks for your help
 
Upvote 0
same idea, just extend the iferror() function

Code:
=IF(Q4="Yes",IFERROR(VLOOKUP(W4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),IFERROR(VLOOKUP(X4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),VLOOKUP(Y4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE))),"Non WH Error")
 
Upvote 0
same idea, just extend the iferror() function

Code:
=IF(Q4="Yes",IFERROR(VLOOKUP(W4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),IFERROR(VLOOKUP(X4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),VLOOKUP(Y4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE))),"Non WH Error")


im confused
23tXtW8
because the third criteria isnt an error the result is "system" (from my data) & your latest sugestion doesnt work im afraid.

if this cell is yes vlookup against 1st set of data (result username or #N/A)
if this is error vlookup against 2nd set of data (result username or "system")
if this is "system" vlookup against 3rd set of data(result username)

23tXtW8
 
Last edited:
Upvote 0
im confused
23tXtW8
because the third criteria isnt an error the result is "system" (from my data) & your latest sugestion doesnt work im afraid.

if this cell is yes vlookup against 1st set of data (result username or #N/A)
if this is error vlookup against 2nd set of data (result username or "system")
if this is "system" vlookup against 3rd set of data(result username)

23tXtW8

may be this

Code:
=IF(Q4="Yes",IFERROR(VLOOKUP(W4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),IF(VLOOKUP(X4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE)="System",VLOOKUP(Y4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE),VLOOKUP(X4,'[FY18-FY19 PPD.xlsx]FY18-FY19 PPD'!$S$2:$T$1048576,2,FALSE))),"Non WH Error")
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,755
Members
449,094
Latest member
dsharae57

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