title: Excel Average if with multiple criteria
body: <p>I am expanding on some help I got here yesterday. </p>
  
  <p>I am using the 'average' and 'if' functions as below:</p>
  
  <pre><code>=AVERAGE(IF(YEAR(A:A)=1999,N:N))
  </code></pre>
  
  <p>I am wanting to also add the condition that if in column F the letters RD appear, the average will be calculated for that year.</p>
  
  <p>Then, I want to calculate the average if the letters RD do NOT appear (i.e. exclude them).</p>
  
  <p>I have tried the AND function but cannot get it to return any results.</p>
  
  <p>TIA.</p>