title: Arrayformula - Cell contains text (Google Sheets)
body: <p>I have the formula written below. On the condition where Column E = &quot;EPIs&quot;, there is a second condition to verify if Column G contains the string (&quot;CC&quot;, &quot;Hemo&quot; or &quot;odonto&quot;).</p>
  <p>But that second condition is not returning correctly the 'contains the specified string' part.
  It gets true for Col E = &quot;EPIs&quot;, but false for the second cases.</p>
  <p>How can I make it work?</p>
  <pre><code>=ARRAYFORMULA(
  IF(B3:B=&quot;&quot;;&quot;&quot;;
  IF(M3:M=&quot;&quot;;&quot;Verificar&quot;;
  IF(M3:M=&quot;Realizado - Sem Certificado&quot;;&quot;Verificar&quot;;
  IF(M3:M=&quot;Manutenção&quot;;&quot;Verificar&quot;;
  IF(M3:M=&quot;Verificar&quot;;&quot;Verificar&quot;;
  IF(M3:M=&quot;Verificar se está ativo&quot;;&quot;Verificar&quot;;
  IF(M3:M=&quot;Não realizado&quot;;&quot;Verificar&quot;;
  IF(M3:M=&quot;Desativado&quot;;&quot;DESATIVADO&quot;;
  
  IF(E3:E=&quot;EPIs&quot;;
  (IF(G3:G=&quot;*CC*&quot;;IF(DATE(YEAR(M3:M);MONTH(M3:M)+6;DAY(M3:M))&gt;TODAY();IF(DATE(YEAR(M3:M);MONTH(M3:M)+4;DAY(M3:M))&gt;TODAY();&quot;OK&quot;;&quot;Realizar CQ&quot;);&quot;Vencido&quot;); 
  IF(G3:G=&quot;*hemo*&quot;;IF(DATE(YEAR(M3:M);MONTH(M3:M)+6;DAY(M3:M))&gt;TODAY();IF(DATE(YEAR(M3:M);MONTH(M3:M)+4;DAY(M3:M))&gt;TODAY();&quot;OK&quot;;&quot;Realizar CQ&quot;);&quot;Vencido&quot;);
  IF(G3:G=&quot;*odonto*&quot;;IF(DATE(YEAR(M3:M)+2;MONTH(M3:M);DAY(M3:M))&gt;TODAY();IF(DATE(YEAR(M3:M)+2;MONTH(M3:M)-2;DAY(M3:M))&gt;TODAY();&quot;OK&quot;;&quot;Realizar CQ&quot;);&quot;Vencido&quot;); 
  IF(DATE(YEAR(M3:M)+1;MONTH(M3:M);DAY(M3:M))&gt;TODAY();IF(DATE(YEAR(M3:M)+1;MONTH(M3:M)-2;DAY(M3:M))&gt;TODAY();&quot;OK&quot;;&quot;Realizar CQ&quot;);&quot;Vencido&quot;)
          ))));
  
  IF(E3:E=&quot;Odonto Intra&quot;;IF(DATE(YEAR(M3:M)+2;MONTH(M3:M);DAY(M3:M))&gt;TODAY();IF(DATE(YEAR(M3:M)+2;MONTH(M3:M)-2;DAY(M3:M))&gt;TODAY();&quot;OK&quot;;&quot;Realizar CQ&quot;);&quot;Vencido&quot;);
  IF(DATE(YEAR(M3:M)+1;MONTH(M3:M);DAY(M3:M))&gt;TODAY();IF(DATE(YEAR(M3:M)+1;MONTH(M3:M)-2;DAY(M3:M))&gt;TODAY();&quot;OK&quot;;&quot;Realizar CQ&quot;);&quot;Vencido&quot;) ) ))))))))))
  </code></pre>