title: Convert Excel Function to VBA Code for automation
body: <p>I am trying to convert my <strong>excel</strong> formulas into <strong>VBA</strong> to automate a spreadsheet that I do daily.</p>
  
  <p>How would I alter the following to work in VBA?</p>
  
  <pre><code>=IF(OR(A2="Story",A2="Task"),((J2+SUMIFS($J:$J,$D:$D,C2))/3600)/8,"")
  
  =IF(OR(A2="Story",A2="Task"),((K2+SUMIFS($K:$K,$D:$D,C2))/3600)/8,"")
  
  =IF(OR(A2="Story",A2="Task"),IF(OR(E2="Done",E2="Closed"),O2,IF(N2&lt;M2,((M2-N2)/M2)*O2,0)),"")
  </code></pre>
  
  <p>Any help would be very appreciated.</p>