Forum Discussion
ISNUMBER(OR(SEARCH not producing expected results.
I am not sure why this is not working. I an no expert so bare with me.
I have a column of text entries. I can use
=ISNUMBER(SEARCH("CARD",D6)) to get a result TRUE/FALSE but I need to extend that to add a second value. So I have tried
=ISNUMBER(OR(SEARCH("PIN",D6),SEARCH("CARD",D6))) which returns only FALSE values and
=ISNUMBER(SEARCH(OR("PIN","CARD"),D6)) which also returns only FALSE values.
Where am I going wrong? Why is the OR not happening?
Thank you for your help.
John
Practically the same
=SUM(--ISNUMBER(SEARCH({"PIN","CARD"},D6)))
or, if return to initial formula
=OR(ISNUMBER(SEARCH("PIN",D6)),ISNUMBER(SEARCH("CARD",D6)))
7 Replies
- SergeiBaklanDiamond Contributor
Practically the same
=SUM(--ISNUMBER(SEARCH({"PIN","CARD"},D6)))
or, if return to initial formula
=OR(ISNUMBER(SEARCH("PIN",D6)),ISNUMBER(SEARCH("CARD",D6)))
- JDRAKE4524Copper Contributor
Thank you for your assistance. The second option worked as how I was looking for the results to be. The first one gave a 0 return (as I would have guessed as a SUM function) and not a FALSE.
Thank you again for your help.
John
- SergeiBaklanDiamond Contributor
John, you are welcome. In Excel FALSE and zero are equivalent, you may use any of them in condition.
- TwifooSilver ContributorI haven’t tested, but you may try, this:
=SUM(COUNTIF(D6,
{“*Card*”,”*Pin*”}))>0- JDRAKE4524Copper Contributor
Thank you for the assistance. This gave an error when entered as not a formula.