title: Excel Formula with if statements and calculations
body: <p>Need assistance on a formula that contains IF statements and calculations.</p>
  
  <p>Manual Data:</p>
  
  <pre><code>                 M      |     E
     Army        $42.65       $5.30
     Air Force   $39.59       $21.51
     Navy        $39.99       $5.06
     Marines     $28.59       $5.29
  </code></pre>
  
  <p>Lines of Accounting</p>
  
  <pre><code> US Navy: 17**20142014
   Army:    21**20152015
   AF:      57**20162016
  </code></pre>
  
  <p>See attached spreadsheet.</p>
  
  <ul>
  <li><p>If column A equals "E "and the first two digits contain "17" for Navy then multiply the number in column C by $5.06 (see above cost for Navy under header E). </p></li>
  <li><p>If column A equals "M "and the first two digits contain "17" then multiply the number in column C by $39.99 (see above cost for Navy under header M). </p></li>
  <li><p>If column A equals "M "and the first digit contains "2" for Coast Guard then multiply the number in column C by $39.99 (see above cost for Navy under header M). </p></li>
  </ul>
  
  <p>I need one large formula that contains the IF statement and calculations for the data listed above that I can place in column E of the attached spreadsheet.</p>
  
  <p><a href="https://i.stack.imgur.com/HzuPO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HzuPO.png" alt="enter image description here"></a></p>