title: nested if testing 3 cells in excel
body: <p>given the image below, I want to test for the highest AvgGain+ cells with a yes so I can determine the Difference in Actual exit vs max reached. I've tried a dozen variations of nested if's but im not coming up with the right result</p>
  
  <p><a href="https://i.stack.imgur.com/ncDiE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ncDiE.png" alt="Sheet Headers"></a>
  My last attempt</p>
  
  <pre><code>=IF(I2="Yes",(D2+H2)-F2,IF(J2="Yes",(D2+(H2*1.1)-F2,IF(K3,D2+(H2*1.2)-F2,D2+(H2*1.1)-F2))))
  </code></pre>
  
  <p>but its coming up with .37c when it should be calculating from the cell K2 Yes value and returning 71c.</p>