newbie
newbie

Reputation: 1

Error while using QUERY with Importrange function

I am trying to use QUERY and importrange data from another spreadsheet (Say A) into my spreadsheet (say B). However, I want to import only rows from A where Column X in A has the same name as in cell L1 of spreadsheet B.

=QUERY(importrange("https://docs.google.com/spreadsheets/d/1IJw96gEObg0fE3SF_XfEXFnilNbjLaHwUm7gctZ74/edit#gid=1403434756","Data !A2:K3000"),"Select * where Col11 = "&L1&"")

error message:

Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: JohnSmith

Upvotes: 0

Views: 49

Answers (1)

player0
player0

Reputation: 1

try this one if it works:

=QUERY(IMPORTRANGE("1IJw96gEObg0fE3SF_XfEXFnilNbjLaHwUm7gctZ74", "Data!A2:K3000"), 
 "select * where Col11 = '"&L1&"'")

or:

=QUERY(IMPORTRANGE("1IJw96gEObg0fE3SF_XfEXFnilNbjLaHwUm7gctZ74", "Data !A2:K3000"), 
 "select * where Col11 = '"&L1&"'")

and if still no luck then try to change = to matches or contains

Upvotes: 1

Related Questions