3

I am trying to show or limit what is seen to just entries made in 2019. I found a few places that referenced this and have tried the following without success.

=query(IMPORTRANGE("1bSyor-91_py58oDPVfalwcSB7Fw4mmJmD1jEOTIE7FU", "FVA_2017!A:M"),"select A,B,C,D,E,F,G,H,I,J,K,L,M where L > date '2019-01-01' and L < date '2019-12-30'")

Or to query the sheet directly from within the same file.

=query("FVA_2017!A:M","select A,B,C,D,E,F,G,H,I,J,K,L,M where L > date '2019-01-01' and L < date '2019-12-30'")

I am getting the same error

"Unable to parse the query string for Function Query parameter 2: NO_COLUMN: A"

trying both of the queries.

If I just do a regular importrange such as

=IMPORTRANGE("1bSyor-91_py58oDPVfalwcSB7Fw4mmJmD1jEOTIE7FU", "FVA_2017!A:M")

I get everything. The date column is L and the format a standard date field from a Google form 4/29/2019. The first row is a header row would this cause an error?

0

2 Answers 2

1

correct syntax:

=QUERY(IMPORTRANGE("1bSyor-91_py58oDPVfalwcSB7Fw4mmJmD1jEOTIE7FU", "FVA_2017!A:M"),
 "where Col12 > date '2019-01-01' 
    and Col12 < date '2019-12-30'", 0)

=QUERY(FVA_2017!A:M, "where L > date '2019-01-01' 
                        and L < date '2019-12-30'", 0)

=QUERY({FVA_2017!A:M}, "where Col12 > date '2019-01-01' 
                          and Col12 < date '2019-12-30'", 0)

=QUERY(INDIRECT("FVA_2017!A:M"), "where Col12 > date '2019-01-01' 
                                    and Col12 < date '2019-12-30'", 0)

2
  • What are the differences between the bottom 3 Queries?
    – FVA
    Commented Apr 29, 2019 at 18:34
  • in essence - none. the result is the same. it's just showoff of syntax differences when you use direct range (L) and indirect range (Col12) or {arrayed range} (Col12)
    – user0
    Commented Apr 29, 2019 at 18:37
0

Please try Importrange and query at the same time using:

=QUERY(IMPORTRANGE("Spreadsheet URL","SO!A:O"), "where Col6 <= date '"&TEXT(K1,"yyyy-mm-dd")&"' AND Col7 >= date '"&TEXT(K1,"yyyy-mm-dd")&"'")

K1 cell: You can update any date in the cell of the same sheet from where or after you need the date range condition. By doing this you can lock in the date easily.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.