title: COUNTIF function if day of week is Tuesday
body: <p>I need to count a column only if the corresponding cell in another column is a Tuesday.  An example image is:</p>
  
  <p><img src="https://i.stack.imgur.com/WBuUN.png" alt="SO25561294 question example"></p>
  
  <p>Initially, I was trying to use a COUNTIFS function paired with a WEEKDAY but I can't get it to work.  </p>
  
  <pre><code>=COUNTIFS(B2:B32,TRUE,A2:A32,WEEKDAY(3))
  </code></pre>
  
  <p>or  </p>
  
  <pre><code>=COUNTIFS(B2:B32,IF(A2=WEEKDAY(3),1,0))
  </code></pre>
  
  <p>Each unit needs to be counted on Tuesday every week.  If they count a day before or after it's considered late.  What needs to happen, is each unit needs to have a count of the number of days that they did count and then the number of days that they didn't count.  In the past, I have accomplished this last part by a simple arithmetic formula based on the number of days in the month.  In addition to the two counts, I also need any missed cells to be filled in with a red background.  </p>
  
  <p>The actual sheet has several tables in the same format ranging from 1 column to 65 columns.</p>