ISNA formula help

AmandaNoyes

New Member
Joined
Apr 7, 2015
Messages
1
Hi all - so I know how to use the ISNA formula with a Vlookup...BUT...I've tried and tried and can't figure out how to use it if you are using nested IF and VLookup.

Here is my current formula:
=IF($E:$E=15%,VLOOKUP($D:$D,rates,8,FALSE),IF($E:$E=30%,VLOOKUP($D:$D,rates,12,FALSE),IF($E:$E="Default",VLOOKUP($D:$D,rates,4,FALSE),"")))

What I need is for it to return the N/A results as 0. How do I do that? Or is there a better way other than ISNA?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
With ISNA

Code:
=IF(ISNA(IF($E:$E=15%,VLOOKUP($D:$D,rates,8,FALSE),IF($E:$E=30%,VLOOKUP($D:$D,rates,12,FALSE),IF($E:$E="Default",VLOOKUP($D:$D,rates,4,FALSE),"")))),0,IF($E:$E=15%,VLOOKUP($D:$D,rates,8,FALSE),IF($E:$E=30%,VLOOKUP($D:$D,rates,12,FALSE),IF($E:$E="Default",VLOOKUP($D:$D,rates,4,FALSE),""))))

If you have Excel 2010 or newer I believe then you can use IFERROR
Code:
=IFERROR(IF($E:$E=15%,VLOOKUP($D:$D,rates,8,FALSE),IF($E:$E=30%,VLOOKUP($D:$D,rates,12,FALSE),IF($E:$E="Default",VLOOKUP($D:$D,rates,4,FALSE),""))),0)
 
Upvote 0
Welcome to the board.

Here's a simplified version of the original formula.
Instead of having 3 vlookups (essentially all the same except the column index #)
Do the IF inside a single vlookup in the column index argument.

=VLOOKUP($D2,rates,IF($E2=15%,8,IF($E2=30%,12,IF($E2="Default",4))),FALSE)

To handle the #N/A, depending on your version of XL
XL2007+
=IFERROR(VLOOKUP($D2,rates,IF($E2=15%,8,IF($E2=30%,12,IF($E2="Default",4))),FALSE),0)

XL2003
=IF(ISNA(VLOOKUP($D2,rates,IF($E2=15%,8,IF($E2=30%,12,IF($E2="Default",4))),FALSE)),0,VLOOKUP($D2,rates,IF($E2=15%,8,IF($E2=30%,12,IF($E2="Default",4))),FALSE))
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

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