title: Excel COUNTIF with multiple criteria and both row and column
body: <p>I'm trying to make a <code>COUNTIF</code> that checks range <code>E8:AI8</code> for the letter &quot;D&quot; and the range <code>E7:AI7</code> for any of the following numbers <code>2;4;8;9;15;20;26;27;33;34;40;41</code></p>
  <p>Also cells in range <code>E5:AI5</code> to not equal any cell in <code>C105:C118</code></p>
  <ul>
  <li><code>E5:AI5</code> is dates in a calender.</li>
  <li><code>C105:C118</code> is a list of dates for holidays.</li>
  </ul>
  <p>My formular so far is looking like this:</p>
  <pre><code>    Sumproduct(countifs($E$8:$AI$8;&quot;*D*&quot;;$E$7:$AI$7;
      {2;4;8;9;15;20;26;27;33;34;40;41};$E$5:$AI$5;&quot;&lt;&gt;&quot;&amp;$C$105:$C$118))
  </code></pre>
  <p>However its not really turning out like i want it, the first two parts of the fomula are working as intended, but the last part comparing the row to the list of dates is not. Is it even possible to compare a row to a column? Or is there another way to do this?</p>