SEARCH + OR Function Excel

Solved
Fabien -  
eriiic Posted messages 24581 Registration date   Status Contributor Last intervention   -
Hello,

I created a table in Excel 2010 where I entered this formula:
=IF(ISNUMBER(SEARCH(26,C:C))*1+ISNUMBER(SEARCH(27,C:C))*1+ISNUMBER(SEARCH(28,C:C))*1+ISNUMBER(SEARCH(32,C:C))*1+ISNUMBER(SEARCH(35,C:C))*1+ISNUMBER(SEARCH(39,C:C))*1,5,0)

The 0 is replaced in my formula by a series of ISNUMBER(SEARCH...
When I open the document in Excel 2003, the formula does not apply because it is too long.

To shorten the formula, I tried this but it doesn't work:
=IF(ISNUMBER(SEARCH(OR(26,27,28....)*1,5,0)

Do you have a solution to my problem, please?

Thank you in advance,

Fabien

10 answers

  1. eriiic Posted messages 24581 Registration date   Status Contributor Last intervention   7 281
     
    Hello,

    A suggestion that should significantly shorten your formula (if I understood your need correctly...).
    Made for a list of 3 values in D89:
    =SUMPRODUCT(ISNUMBER(SEARCH({10;12;42},C89))*1)
    Returns 2 because 10 and 42 are present in the string.

    eric
    2
    1. Fabien
       
      Thank you Eric, problem solved.
      0
    2. eriiic Posted messages 24581 Registration date   Status Contributor Last intervention   7 281
       
      Okay, I’ll mark it as resolved for you.
      Eric
      0