Formula Evaluates To Zero

goss

Active Member
Joined
Feb 2, 2004
Messages
372
Hi all,

Using Excel 2010.

This formula is returning zero
=IF(ISERROR(AND(FIND("RABBIT",B18),FIND("FOX",B18))),0,1)

The first part, FIND("RABBIT",B18) evaluates to 5 when I highlight and hit [F9] in the formula bar

The second part, FIND("FOX",B18)evaluates to #VALUE! when I highlight and hit [F9] in the formula bar

It appears that a value of 1 would be correct answer since both conditions do not return an error.

What might I be missing here?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi all,

Using Excel 2010.

This formula is returning zero
=IF(ISERROR(AND(FIND("RABBIT",B18),FIND("FOX",B18))),0,1)

The first part, FIND("RABBIT",B18) evaluates to 5 when I highlight and hit [F9] in the formula bar

The second part, FIND("FOX",B18)evaluates to #VALUE! when I highlight and hit [F9] in the formula bar

It appears that a value of 1 would be correct answer since both conditions do not return an error.

What might I be missing here?
It's because with AND all the arguments must be TRUE.

Try it like this:

=IF(COUNT(FIND({"RABBIT","FOX"},B18)),1,0)
 
Upvote 0
Thanks Biff and Norie,

Biff your formula works - thanks.

My formula did not work because I have the the ISERROR and the AND condition juxtaposed.

My correct fomula is:
=IF(AND(ISERROR(FIND("RABBIT",B18)),ISERROR(FIND("FOX",B18))),0,1)

But Biff's formulas is better - more succinct.
 
Upvote 0
Thanks Biff and Norie,

Biff your formula works - thanks.

My formula did not work because I have the the ISERROR and the AND condition juxtaposed.

My correct fomula is:
=IF(AND(ISERROR(FIND("RABBIT",B18)),ISERROR(FIND("FOX",B18))),0,1)

But Biff's formulas is better - more succinct.
You're welcome. Thanks for the feedback! :cool:
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,289
Members
452,902
Latest member
Knuddeluff

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