title: VLOOKUP + QUERY + IMPORTRANGE > import all lines with condition true
body: <blockquote>
  <p>Following this question <a href="https://stackoverflow.com/questions/73139331/importrange-extra-column-does-not-behave-as-table">IMPORTRANGE + extra column does not behave as table</a>, I read about the VLOOKUP+QUERY+IMPORTRANGE
  other questions and decided it was a good way to use an index to store
  lines without breaking the logic of the other sheets.</p>
  </blockquote>
  <p>I am using a combined VLOOKUP + IMPORTRANGE to copy original data to a viewer sheet. I have the lines imported correctly, matching their index, but I needed the condition that only checked lines in the original data sheet should be imported to the viewer SS.
  The Viewer SS then presents a copy of the datas and will also use checkboxes to select and show some data in another sheet. Thus, I needed the index to keep the order in the table and not mess this final step.</p>
  <p>This shows the lines with matching index ( I do not have the checked condition): <code>=IFERROR(arrayformula(VLOOKUP($A$3:$A$1001;IMPORTRANGE($A$1;&quot;DataSorts!B2:S1000&quot;);2;false));&quot;&quot;)</code></p>
  <p>This gets only the lines where a checkbox (Col1) is checked in the original data sheet :
  <code>QUERY(IMPORTRANGE(A1;I1);&quot;select Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10 where Col1='TRUE'&quot;;1)</code></p>
  <p>You can find an exemple of the logic here : <a href="https://docs.google.com/spreadsheets/d/1qBGkWETY2fcUks2gsPgeRSaG_RuFkOmik0_WKNs1nUQ/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1qBGkWETY2fcUks2gsPgeRSaG_RuFkOmik0_WKNs1nUQ/edit?usp=sharing</a></p>
  <p>Be aware that I put the original data example in the same SS, for simplicity. I'll use an IMPORTRANGE in the QUERY or the VLOOKUP to get the real datas, whichever is the best solution.</p>
  <p>Thanks a lot for the help !</p>