0

I use formula =SEARCH({"N.","No.","#"},D5) and it fails if doesn't fit first option "N." how can I fix it?

GGSandro
  • 27
  • 1
  • 1
  • 5
  • check this answer out: http://stackoverflow.com/questions/14803944/excel-searching-for-multiple-terms-in-a-cell – krib Apr 20 '17 at 09:39

1 Answers1

0

Using =SEARCH({"N.","No.","#"},D5) formula when you will see how the formula calculates the result using Evaluate Formula, you'll notice

enter image description here

evaluates to

enter image description here

That means formula is searching only for "N."

Therefore to search for the existence of "N.","No.","#" in a cell, number of approaches are available like:

1. =IF(COUNT(SEARCH({"N.","No.","#"},D5)),1,"")

This formula will give 1 if any of the string in the cell exists.

2. =SUMPRODUCT(--ISNUMBER(SEARCH(find_text,D5)))>0

This formula will give TRUE if any of the three string exists else FASLE.

Mrig
  • 11,612
  • 2
  • 13
  • 27