title: Use ARRAYFORMULA with horizontal COUNTIF
body: <p>I am using <code>COUNTIF</code> to count the number of occurrences of a value in a horizontal range, which is working fine:</p>
  
  <p><a href="https://i.stack.imgur.com/ZEsw3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZEsw3.png" alt="enter image description here"></a></p>
  
  <p>Now I would like to use <code>ARRAYFORMULA</code> to automatically apply that logic to an entire column. My problem is that <code>ARRAYFORMULA</code> doesn't seem to work well with <code>COUNTIF</code> as my range spans both horizontally and vertically. I tried several things:</p>
  
  <ul>
  <li><code>=ARRAYFORMULA(IF(COUNTIF(B2:D,"Passed")=3,"Passed","Failed"))</code> : the formula doesn't even replicate across the column</li>
  <li><code>=ARRAYFORMULA(IF(ISBLANK(B2:B),"",IF(COUNTIF(B2:D,"Passed")=3,"Passed","Failed")))</code> : using the extra <code>IF(ISBLANK(B2:B)</code> trick solves the above issue, but the results are wrong</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/Hn4G7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hn4G7.png" alt="enter image description here"></a></p>
  
  <p><strong>How can I apply <code>ARRAYFORMULA</code> to a formula containing a horizontal <code>COUNTIF</code>?</strong></p>
  
  <p><a href="https://docs.google.com/spreadsheets/d/17X50F6HAq3O7g1_F6HdicllGuYAT3uoqkPqaiMuAdUI/edit?usp=sharing" rel="nofollow noreferrer">Here is a link to the spreadsheet if you want to play around</a></p>