Short formula not returning expected result?

Mr2017

Active Member
Joined
Nov 28, 2016
Messages
458
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.

Thanks in advance.
 

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
16,317
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
Joined
Nov 28, 2016
Messages
458
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.
 

Mr2017

Active Member
Joined
Nov 28, 2016
Messages
458
Oh, ok!!

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

Thanks again for your help!
 

Forum statistics

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

Some videos you may like

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...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top