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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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,215,327
Messages
6,124,292
Members
449,149
Latest member
mwdbActuary

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