title: Need to convert excel IF AND statement into VBA
body: <p>I have a long IF AND statement in excel (exceeding the limit) that i need to convert into VBA but cant get it to work. </p>
  
  <p>I have two columns of text lists (C &amp; D) that I want to determine the resulting risk level in column E. </p>
  
  <p>the IF AND statement that i came up with is this for a single cell:</p>
  
  <pre><code>=IF(AND(C2="Improbable",D2="Acceptable"),"Low",IF(AND(C2="Improbable",D2="Tolerable"),"Medium",IF(AND(C2="Improbable",D2="Unacceptable"),"High",IF(AND(C2="Improbable",D2="Undesirable"),"Medium",IF(AND(C2="Possible",D2="Acceptable"),"Low",IF(AND(C2="Possible",D2="Tolerable"),"Medium",IF(AND(C2="Possible",D2="Unacceptable"),"Critical",IF(AND(C2="Possible",D2="Undesirable"),"High",IF(AND(C2="Probable",D2="Acceptable"),"Medium",IF(AND(C2="Probable",D2="Tolerable"),"HIgh",IF(AND(C2="Probable",D2="Unacceptable"),"Critical",IF(AND(C2="Possible",D2="Undesirable"),"High",""))))))))))))
  </code></pre>
  
  <p>and this works but there are too many IF statements for excel. </p>
  
  <p>Any advice on how to convert this to VBA and for the entire column?</p>