title: Formula works by dragging down the mouse but doesn't work with ArrayFormula
body: <p>I have an issue that I just can't understand what is the problem. I am trying to compare two spreadsheets data to generate some results based on them.</p>
  
  <p>What I have at the moment is a speadsheet to use as a query:</p>
  
  <pre><code>Question 1 | Question 2 | Question 3
  (dropdown) | (dropdown) | (dropdown)
  (dropdown) | (dropdown) | (dropdown)
  (dropdown) | (dropdown) | (dropdown)
  (dropdown) | (dropdown) | (dropdown)
  </code></pre>
  
  <p>PS: Those four dropdowns on each column have the same value - the idea is to create a "multi-selection" dropdown for each question.</p>
  
  <p>Then I have another spreadsheet (which is my "database") like this:</p>
  
  <pre><code>Is valid? -=- | Data I Need | Answer 1 | Answer 2 | Answer 3
  TRUE / FALSE  | Data needed | Multiple answers separated by a comma
  </code></pre>
  
  <p>And I have a third spreadsheet called Results that should show only the matching questions/answers.</p>
  
  <p>Everything works perfectly except for that fact that I have to drag down the formula through all my column to repeat the formula on my database spreadsheet. If I try to add an ArrayFunction on the first line it doesn't repeat the formula.</p>
  
  <p>On my database spreadsheet I am using this formula in my "Is valid?" column (this is what I repeat my entire the column by draging down the mouse):</p>
  
  <pre><code>=IF(AND(SUM(
  IF(OR(ISNUMBER(MATCH("All",NamedRangeQuestion1)),SUMPRODUCT(ARRAYFORMULA(ISNUMBER(MATCH(TRANSPOSE(TRIM(SPLIT(Database!C2,","))),NamedRangeQuestion1,0))))),TRUE,FALSE),
  IF(OR(ISNUMBER(MATCH("All",NamedRangeQuestion2)),SUMPRODUCT(ARRAYFORMULA(ISNUMBER(MATCH(TRANSPOSE(TRIM(SPLIT(Database!D3,","))),NamedRangeQuestion3,0))))),TRUE,FALSE), IF(OR(ISNUMBER(MATCH("All",NamedRangeQuestion2)),SUMPRODUCT(ARRAYFORMULA(ISNUMBER(MATCH(TRANSPOSE(TRIM(SPLIT(Database!E3,","))),NamedRangeQuestion3,0))))),TRUE,FALSE)
  ) = COUNTIF(queryRowTotal,"Filtering"),COUNTIF(queryRowTotal,"Filtering") &gt; 0),
  TRUE,FALSE
  )
  </code></pre>
  
  <p>It working perfect but the problem is that I have to drag down my formula to my entire column. If I try to use ArrayFormula on this it just doesn't work.</p>
  
  <p>And on my "Results" spreadsheet I have:</p>
  
  <pre><code>=IFERROR(query(tableDatabase,"select B WHERE A = TRUE",-1),"")
  </code></pre>
  
  <p>What I need is to collect the matching results on my Results spreadsheet. It's all working fine but having to drag down the mouse instead of repeating the formula automatically is a deal break in my case.</p>
  
  <p><a href="https://docs.google.com/spreadsheets/d/12XRtLls8xYnebgdxERm2yOC2VIO3fmIG9bXd5zsm0Ec/copy" rel="nofollow noreferrer">Here</a> I have a working example of my spreadsheets.</p>
  
  <p>What am I doing wrong here?</p>
  
  <p>A better solution would be by creating a query direct on the results spreadsheet without having to write that code on the "database" spreadsheet, but I couldn't think in a solution using filter and/or query function.</p>