# Short formula not returning expected result?

#### Mr2017

##### Active Member
Hi

I've got a formula that searches for two conditions in a cell and if it doesn't find them, then it should return a blank. But it's returning the word "FALSE" instead.

What makes things even more odd is that I've written another formula to check if the word "FALSE" appears in that cell, but the formula doesn't pick it up?

Has anyone ever experienced this before? If so, do you know why it happens?

Please find below sample data - only three cells:

A1 has this text: ABCD 3.50

B1 has this formula: =IF(ISNUMBER(SEARCH("for ",A1)),IF(ISNUMBER(SEARCH("€",A1)),"Euro & For ","")) ie it checks if a cell has the word "for" and the word the euro sign

C1 has this formula: =IF(B1="FALSE","Ok","What's going on?") ie it checks if the word "FALSE" appears in cell B1, which it does in this case, but this formula doesn't pick it up!?? This is the most bizarre thing I've ever seen in Excel!

If you know the solution to this problem, it would be greatly appreciated.

#### Marcelo Branco

##### MrExcel MVP
The formula in B1 should be

=IF(ISNUMBER(SEARCH("for ",A1)),IF(ISNUMBER(SEARCH("€",A1)),"Euro & For ",""),"")

By the way, your formula in C1 doesn't return "Ok" because your original formula in B1 returns the logical (boolean) value FALSE, not a string "FALSE".

M.

#### Mr2017

##### Active Member
Oh, cool! Thanks Marcelo - your amended formula worked!

Re the other suggestion , do you know if it's possible to create a formula that will pick up a logical (boolean) value FALSE (in case I have a similar problem, in future, where a long formula is not working)?

The original IF statement I have, has over 20 arguments, so I had to painstakingly rule out the ones that didn't work before finding the one I posted in my original question.

Thanks again for your help, so far.

#### Marcelo Branco

##### MrExcel MVP
Try without the quotes

=IF(B1=FALSE,"Ok","What's going on?")

M.

#### Mr2017

##### Active Member
Oh, ok!!

Thanks - I didn't know the solution was that simple!

1,081,984
Messages
5,362,556
Members
400,680
Latest member
Wild Child

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...