title: Filter Vlookup results inside a query
body: <p>the problem I am immediately trying to solve is filtering the results of a VLOOKUP.</p>
  <p>This formula is working:</p>
  <p><code>=ArrayFormula(IFERROR(vlookup($A$4:$A,importrange(&quot;1XYHLG4-BhVUxXObvjEiozI6i19H5Jum97g87uFS6sYs&quot;, &quot;DO_NOT_USE!A2:H3000&quot;),{2,3,4,5},false)))</code></p>
  <p>but I want to auto filter the results. I found an answer on this post: <a href="https://stackoverflow.com/questions/53508355/add-filter-to-vlookup-formula-google-sheets">Add Filter to Vlookup formula Google sheets</a></p>
  <p>However, when I do that, it seems ignores the VLOOKUP part. My results are no longer matched to the correct index key in Col A.</p>
  <p><code>=query(ArrayFormula(IFERROR(vlookup(A4:A,importrange(&quot;1XYHLG4-BhVUxXObvjEiozI6i19H5Jum97g87uFS6sYs&quot;, &quot;DO_NOT_USE!A2:H3000&quot;),{2,3,4,5},false))), &quot;WHERE Col2='&quot;&amp;B2&amp;&quot;'&quot;, 1)</code></p>
  <p>Additional context: The problem I was originally trying to solve for was linking dynamic and static data. I have a larger sheet that I have divided using a query so that each school (about 60 schools) is only allowed to see data that pertains to them. Unfortunately, they must be able to manually add info to that sheet (this data is eventually generated into yet another sheet and required). I started solving this problem because this entire process was always done entirely on paper before and all info was hand-entered.</p>
  <p>I feel like I'm SO CLOSE to a solution but I'm not sure where I'm going wrong.</p>
  <p>EDIT- Sample data:</p>
  <p><a href="https://docs.google.com/spreadsheets/d/1zSivb83POAerrQAJpfu68HlWTLKtsLgBu-MKf-b3SBc/edit?usp=sharing" rel="nofollow noreferrer">Fake Source Data</a></p>
  <p><a href="https://docs.google.com/spreadsheets/d/16HUIbCb43PCGFU1gfaKPiSThX135tw2HcgWwkFRMqRc/edit?usp=sharing" rel="nofollow noreferrer">Fake Query Test</a></p>