Create Import Range with 2 Qualifications


I currently have an import range set up in my google sheet calling data using one column, but I would like for it to look at two columns in combination to query the information.

Right now I have:
=QUERY(importrange(“URL”,“Name of Sheet A:BI”), “select * where Col30 contains ‘Yes’”)

I would for it to also look at Col62 for the word Complete.
When I added Col62 contains ‘Complete’ I got an error. Am I doing something wrong?


Try this:

=QUERY(importrange("URL","Name of Sheet A:BI"), 'select * where Col30 contains ‘Yes’ and Col62 contains 'Complete'")

Good advice for you, do not use query for glide or any platform to create apps from sheets, stick to lookup formulas and find workaround for yor goals… it will save you tons of problems and time, plus your app will work much faster.
And use glide tables and glide formulas as much as you can…


I think that’s generally good advice, but I wouldn’t use it as a hard and fast rule.
It depends on the situation and use case.
For example, in this case Jen is using a sheet formula to import data from an external source. That simply isn’t possible using Glide, so she has no choice.

But yeah, I do agree that it’s generally preferable to do it in Glide where ever possible.


Thanks! Yes, that’s what I did it, it tells me there’s no column 62 but there is in the original sheet.

My point is, when you use lookup only, you will force yourself to structure sheet the way that is easy later to use in glide.
All query and filters are based on lookup,

Thanks! Lookup in google sheets or glide? Glide is a little more time consuming bringing over 40+ columns…did it once already :weary:

In Google sheets.
I know is harder to do, but it will benefit you later.

Oh, you need to expand your source range.
BI would be Column61, so you are one column short :joy:

Try this:

=QUERY(importrange("URL","Name of Sheet A:BJ), 'select * where Col30 contains ‘Yes’ and Col62 contains 'Complete'")

Ahhh, Thank you! That worked.

1 Like

If you’re talking about the query results, then row owners should not be a problem since it only affects the Glide side.

1 Like

Figured it out! Changed the columns and misnumbered them.