Formula Help OR/ISNA

Arts

Well-known Member
Joined
Sep 28, 2007
Messages
765
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi all

I am trying to do an OR statement to include if a value returns back #N/A or 0 (if a value is found of the look up but there is no value to return, hope that makes sense)

So Harry exists but has no score so this returns 0

I was successful with the ISNA and the 0 individually but cant seem to merge them.

The formula I attempted was =IF(OR(ISNA(INDEX($D$3:$D$5,MATCH(F5,$C$3:$C$5,FALSE))),INDEX($D$3:$D$5,MATCH(F5,$C$3:$C$5,FALSE))=0),"",INDEX($D$3:$D$5,MATCH(F5,$C$3:$C$5,FALSE))) but John still seems to return #N/A

Any help on this would be welcome as always and if possible a reason why my formula failed, I really thought I had it...




NameScoreLookupReturn
James
56​
James
56​
FredHarry
HarryJohn
#N/A​
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
How about
Excel Formula:
=IF(ISNA(INDEX($D$3:$D$5,MATCH(F3,$C$3:$C$5,FALSE))),"",IF(INDEX($D$3:$D$5,MATCH(F3,$C$3:$C$5,FALSE))="","",INDEX($D$3:$D$5,MATCH(F3,$C$3:$C$5,FALSE))))
 
Upvote 0
Solution
How about
Excel Formula:
=IF(ISNA(INDEX($D$3:$D$5,MATCH(F3,$C$3:$C$5,FALSE))),"",IF(INDEX($D$3:$D$5,MATCH(F3,$C$3:$C$5,FALSE))="","",INDEX($D$3:$D$5,MATCH(F3,$C$3:$C$5,FALSE))))

Seems spot on! Thank you!

Would you be kind enough to explain where my OR/ISNA combo failed? When I use the evaluate tool it seems to give me TRUE for the first OR but then shows #N/A for the second. But when doing then separately they both work, really thought using the OR would merge them both giving me what I needed.
 
Upvote 0
It's because you get #N/A so the OR function returns that error.
 
Upvote 0
I think it's this that's throwing me

When I break down the formula both are giving back TRUE or FALSE which is what I would want


1691777359369.png



But on John I get an #N/A where in my head I'm thinking if an #N/A is returned the ISNA would pick this up and insert the ""

1691777489394.png


I think i need to log of and get out the office been looking at this so long I'm at the cant see the wood for the trees stage I think
 
Upvote 0
If anything inside OR returns an error (like the 2nd Index/Match) then OR will return that error.
 
Upvote 0
Yeah I don't think it computing...

For James none are true and I get a FALSE which is fine (No #N/A), why would I not get a FALSE for John but instead get an #N/A, in a sense John is also FALSE

1691778394448.png
 
Upvote 0
Yeah I don't think it computing...

For James none are true and I get a FALSE which is fine (No #N/A), why would I not get a FALSE for John but instead get an #N/A, in a sense John is also FALSE

View attachment 97036

After wrestling with this on a Saturday I still seem to miss the mark.

If my last response could be ignored as it was late on Friday. After looking at this now what I mean to say is


For James none are true and I get a FALSE which is fine (No #N/A and nothing =0) so my OR would be (FALSE, FALSE)

For John we have a #N/A as he is not in the look up so and there is no score equaling 0

So I would expect my OR to say

(TRUE (as there is an #N/A), TRUE (as the result doesn't =0)

Fluff mentioned "If anything inside OR returns an error (like the 2nd Index/Match) then OR will return that error." - isn't the point to get an #N/A so the ISNA would pick this up and the OR return TRUE
 
Upvote 0
The ISNA does pick up the error as can be seen in your image in post#5, but you can also see in that image there is a #N/A error & that is what the OR function returns
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,143
Members
449,098
Latest member
Doanvanhieu

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