Opposite of ISNA Function

jeffgibson55

New Member
Joined
Aug 22, 2011
Messages
17
I often need a formula to not return an error value (e.g., "#NA") because it throws off my formulas and pivot tables, so I often find myself throwing an "IF(ISNA" into my formulas to return a custom value or to do another formula in the case of an error otherwise being returned.

But when I have a lot of conditions, this "ISNA" logic gets long and complex so I'd rather use the inverse: "IFNotISNA" a/k/a "IfTrue". Does such an inverse to ISNA exist?

Example: I want to look something up, but if an error is returned I want to look elsewhere - below is how I write these things now (using "IF(ISNA"'s). This is fine for a few conditionals, but when I want to add a bunch of error-conditional stuff using the "IF(ISNA" the formula gets really clunky and hard to follow.

If(ISNA(Vlookup(Sheet1!A1,Sheet2!X1:Z99,2,false)),Vlookup(Sheet1!A1,Sheet3!X1:Z99,2,false),Vlookup(Sheet1!A1,Sheet2!X1:Z99,2,false)

Thanks!
Jeff
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi

Within an IF if you want a True returned for a non-ISNA result you could use the following construct:

=IF(1-ISNA(term),Value If Not ISNA, Value if ISNA)

This works because if ISNA() returns True then 1-True = 0 (ie False argument returned), else 1-False=0 (True argument returned).
 
Upvote 0
Thanks so much for the quick help guys! The quick solutions found on this forum never ceases to surprise me!

"If(Not" opens up a lot of doors for me!

Thanks!
Jeff
 
Upvote 0
I often need a formula to not return an error value (e.g., "#NA") because it throws off my formulas and pivot tables, so I often find myself throwing an "IF(ISNA" into my formulas to return a custom value or to do another formula in the case of an error otherwise being returned.

But when I have a lot of conditions, this "ISNA" logic gets long and complex so I'd rather use the inverse: "IFNotISNA" a/k/a "IfTrue". Does such an inverse to ISNA exist?

Example: I want to look something up, but if an error is returned I want to look elsewhere - below is how I write these things now (using "IF(ISNA"'s). This is fine for a few conditionals, but when I want to add a bunch of error-conditional stuff using the "IF(ISNA" the formula gets really clunky and hard to follow.

If(ISNA(Vlookup(Sheet1!A1,Sheet2!X1:Z99,2,false)),Vlookup(Sheet1!A1,Sheet3!X1:Z99,2,false),Vlookup(Sheet1!A1,Sheet2!X1:Z99,2,false)

Thanks!
Jeff
Another way...

If your lookup formula returns TEXT:

=IF(ISTEXT(your_formula)...

If your lookup formula returns NUMBERS:

=IF(COUNT(your_formula)...

If your lookup formula could return either text or numbers:

=IF(NOT(ISNA(your_formula))...
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,631
Members
449,241
Latest member
NoniJ

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