title: IF - ELSE IF - ELSE Structure in Excel
body: <p><strong>Requirement :</strong></p>
  
  <p>If the string in cell A1 contains "abc" as part of the string</p>
  
  <p>Then assign value "Green"</p>
  
  <p>Else if the string in cell A1 contains "xyz" as part of the string</p>
  
  <p>Then assign value "Yellow"</p>
  
  <p>Else</p>
  
  <p>Assign value "Red"</p>
  
  <p><strong>I tried this :</strong></p>
  
  <p><code>=IF(FIND("~",SUBSTITUTE(A1,"abc","~",1))&lt;&gt;"#VALUE!", "Green", IF(FIND("~",SUBSTITUTE(A1,"xyz","~",1))&lt;&gt;"#VALUE!", "Yellow", "Red"))</code></p>
  
  <p>It works if first IF is True in other cases it gives #VALUE! as output.</p>
  
  <p>Can't figure out whats wrong.</p>