0
votes

I'm trying to import a selection of columns if the text in a row is "Week 2." I'm having the issue that the query is only returning the header row. The formula I'm using is this:

=query(importrange("https://docs.google.com/spreadsheets/d/1Eu5dJ5dOgFsG7jeIB1umoDOamt5r3BzYYoTWA1Rxyh0/edit#gid=0", "Sheet1!A:Z"),"select Col5,Col7,Col8 where Col6='Week 2'",1)

I have some test sheets here:

Original where I'm importing info from: https://docs.google.com/spreadsheets/d/1Eu5dJ5dOgFsG7jeIB1umoDOamt5r3BzYYoTWA1Rxyh0/edit#gid=0

Final destination (formula in A2): https://docs.google.com/spreadsheets/d/19IC36izklxgId5zjtzr9HP71JYTrt_ReHBgxbAwBEpg/edit#gid=0

1
I'm open to using a filter formula or anything else. I just couldn't get that to work either.J Hawke

1 Answers

0
votes

Your query is fine, but you have the wrong column no.

=query(importrange("https://docs.google.com/spreadsheets/d/1Eu5dJ5dOgFsG7jeIB1umoDOamt5r3BzYYoTWA1Rxyh0/edit#gid=0", "Sheet1!A:Z"),"select Col5,Col7,Col8 where Col6='Week 2'",1)

should be

=query(importrange("https://docs.google.com/spreadsheets/d/1Eu5dJ5dOgFsG7jeIB1umoDOamt5r3BzYYoTWA1Rxyh0/edit#gid=0", "Sheet1!A:Z"),"select Col5,Col7,Col8 where Col5='Week 2'",1)