title: Excel Combining ISNUMBER(SEARCH and another AND and OR condition
body: <p>I am able to achieve what I want using 2 formulas but I would like to use only 1.</p>
  
  <p>I am currently using the following formula, to check if a cell contains string1 or string2 to return ST1 or ST2.</p>
  
  <blockquote>
    <p>=IF(ISNUMBER(SEARCH("STRING1",C3)),"ST1",IF(ISNUMBER(SEARCH("STRING2",C3)),"ST2",A3))</p>
  </blockquote>
  
  <p>Then I am using the following formula on the column that contains the previous formula,</p>
  
  <blockquote>
    <p>=IF(AND(A3="AE",OR(C3="ST1",C3="ST2")),E3,A3)</p>
  </blockquote>
  
  <p>Is it possible to combine everything in just one formula?</p>
  
  <p><strong>The logic should be:</strong> </p>
  
  <p>If cell A1 contains "string0" AND cell C1 contains "string1" return ST1; </p>
  
  <p>If cell A1 contains "string0" AND cell c1 contains "string2" return ST2;</p>
  
  <p>Otherwise return A1</p>
  
  <p>Many thanks</p>