Search code examples
arraysgoogle-sheetsgoogle-sheets-formula

How do I query multiple sheets in Google Sheet that result in a single master sheet?


I have multiple sheets, in the example, Sheet1 and Sheet2 that I would like to query that results in a single Master sheet. see the Example sheet

I followed this tutorial but it seems like I am missing something as the Master sheet only show results from Sheet1.


Solution

  • Option 01 - with headers

    Use this formula or Make a copy of the example sheet.

    =QUERY({ Sheet1!A1:C;Sheet2!A2:C }, "Select * Where Col1 is not null")
    

    enter image description here

    Explanation

    • {} Array
    • ; Stack ranges on top of each other
    • , to join columns side by side "we didn't need it in this example"
    • "Select * Where Col1 is not null" Select all columns where column1 is not empty

    Option 02 - without headers

    =QUERY({ Sheet1!A2:C;Sheet2!A2:C }, "Select * Where Col1 is not null")
    

    enter image description here