title: Google sheets - Search and bring as list and paste it to next empty row
body: <p>I need your help to create a list of search results.</p>
  <p>I have a list of search items (over 10.000 items ) as you can see on screenshot column B.</p>
  <p>I wrote a function to bring result from main list (on Sheet DM1).
  =QUERY('DM1'!$C$4:$J$12874,&quot;select * where G LIKE '%&quot;&amp;B3&amp;&quot;%' &quot;,1)</p>
  <p>It works fine. But I need to add all the search result (which always include more than one row mostly 4-5 rows and consist of 8 columns) after each other without empty cells between.</p>
  <p>So basically according to my search results I would like to make (continuous) another complete list which consist of 8 columns.</p>
  <p>How can I do that on google sheets?</p>
  <p>If there is a way to filter my main list on DM1 sheet with the values from my search list in another way that works for me also.</p>
  <p><a href="https://i.stack.imgur.com/PeccY.png" rel="nofollow noreferrer">Column B Search list, Column C to J is the results</a></p>
  <p>@ale13 hey, The screenshot shows search result for only &quot;14Q02&quot;. And following items on the list (column B) needs to be copied right under it.</p>
  <p>My formula copies with titles { I do not need that after first search item so formula could be  =QUERY('DM1'!$C$4:$J$12874,&quot;select * where G LIKE '%&quot;&amp;B3&amp;&quot;%' &quot;,0) }</p>
  <p>Here is the screenshot (I only added second item search result which is &quot;14Q04&quot;.)</p>
  <p><a href="https://i.stack.imgur.com/J1R2E.png" rel="nofollow noreferrer">Here is the screenshot (I only added second items search result which is &quot;14Q04&quot;) together with first item.</a></p>
  <p><a href="https://docs.google.com/spreadsheets/d/1M0bhy3CMCzj7OiOsw6pjKVg4JAPaucTplb3VHTrp2L4/edit?usp=sharing" rel="nofollow noreferrer">Sample file is here</a></p>