SOLVED

ISNUMBER(OR(SEARCH not producing expected results.

Copper Contributor

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

 

 

 

7 Replies
I haven’t tested, but you may try, this:
=SUM(COUNTIF(D6,
{“*Card*”,”*Pin*”}))>0
best response confirmed by JDRAKE4524 (Copper Contributor)
Solution

@JDRAKE4524 

Practically the same

=SUM(--ISNUMBER(SEARCH({"PIN","CARD"},D6)))

or, if return to initial formula

=OR(ISNUMBER(SEARCH("PIN",D6)),ISNUMBER(SEARCH("CARD",D6)))

 

 

@Twifoo 

Thank you for the assistance. This gave an error when entered as not a formula.

@Sergei Baklan 

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

 

@JDRAKE4524 

John, you are welcome. In Excel FALSE and zero are equivalent, you may use any of them in condition.

@Sergei Baklan 

Yes. That is true. For this instance I needed a return of FALSE for visual reasons more so than anything. Thanks

@JDRAKE4524 

I see. In this case you may use something like

=SUM(...)<>0
1 best response

Accepted Solutions
best response confirmed by JDRAKE4524 (Copper Contributor)
Solution

@JDRAKE4524 

Practically the same

=SUM(--ISNUMBER(SEARCH({"PIN","CARD"},D6)))

or, if return to initial formula

=OR(ISNUMBER(SEARCH("PIN",D6)),ISNUMBER(SEARCH("CARD",D6)))

 

 

View solution in original post