# Create Import Range with 2 Qualifications

**URL:** <https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124>\
**Category:** Ask for Help\
**Created:** [February 20, 2021, 7:34am UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124 "2021-02-20T07:34:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 20, 2021, 7:34am UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/1 "2021-02-20T07:34:43Z")

</div>

Hi!

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?

Thanks!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 20, 2021, 7:41am UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/2 "2021-02-20T07:41:32Z")

</div>

> [@Jen\_NYCP](#):
>
> =QUERY(importrange(“URL”,“Name of Sheet A:BI”), “select \* where Col30 contains ‘Yes’”)

Try this:

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

```

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [February 20, 2021, 7:46am UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/3 "2021-02-20T07:46:33Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 20, 2021, 7:58am UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/4 "2021-02-20T07:58:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 20, 2021, 8:01am UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/5 "2021-02-20T08:01:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [February 20, 2021, 8:01am UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/6 "2021-02-20T08:01:39Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 20, 2021, 8:04am UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/7 "2021-02-20T08:04:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [February 20, 2021, 8:05am UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/8 "2021-02-20T08:05:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 20, 2021, 8:23am UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/9 "2021-02-20T08:23:43Z")

</div>

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

 ![Screen Shot 2021-02-20 at 4.23.00 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/2/a2e0c4b08c70b796ed5b03b475ac9408694a8d4a.png)

Try this:

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

```

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 20, 2021, 2:36pm UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/10 "2021-02-20T14:36:02Z")

</div>

Ahhh, Thank you! That worked.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 21, 2021, 11:19pm UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/12 "2021-02-21T23:19:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 22, 2021, 2:16am UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/13 "2021-02-22T02:16:40Z")

</div>

Figured it out! Changed the columns and misnumbered them.

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:53pm UTC](https://community.glideapps.com/t/create-import-range-with-2-qualifications/23124/14 "2024-01-17T16:53:19Z")

</div>


