Home > Software engineering >  Multiple Imporranges without empty cells
Multiple Imporranges without empty cells

Time:11-18

So I'm trying to import data from two different google sheets into the same column. Since new data will be put into each column I have to import the whole thing. My problem is that I can just use two import ranges with a lot of empty cells between the relevant date, but no one wants that. After trying a lot and googling like made I came up with this:

=QUERY({IMPORTRANGE("https://docs.google.com/spreadsheets/d/1RwSw-JvLO3yqJxwQ9FBdfTcUjtSKlMMF3GF0Al-mGu8/edit#gid=286899333", "Sheet1!A1:A");IMPORTRANGE("https://docs.google.com/spreadsheets/d/1RwSw-JvLO3yqJxwQ9FBdfTcUjtSKlMMF3GF0Al-mGu8/edit#gid=286899333", "Sheet1!B1:B");},
"SELECT Col1 WHERE Col1 != ''")

But that also does not work. I set up an example sheet: enter image description here

or faster:

=QUERY({FLATTEN(IMPORTRANGE("1yr5f4eMsnbUuhzdCNQk2RkKmXoyU3WHhn1PBcWqZvgU", "Sheet1!A4:B"));
                IMPORTRANGE("1yr5f4eMsnbUuhzdCNQk2RkKmXoyU3WHhn1PBcWqZvgU", "Sheet3!A1:A")},
 "select Col1 where Col1 is not null", 0)

enter image description here

  • Related