Reputation: 27
I am trying to do the following:
importrange
.This is what I already tried to do:
Script
=query(importrange("Link1","Sheet!b1:h"),"SELECT G, H where B = "Criteria_to_meet"",-1)
But it does not work.
Upvotes: 0
Views: 198
Reputation: 27
Thanks for your help. Your comments were very usesful. This is how it finally worked.
Cell A1
contains criteria_to_meet
, and we expanded the importrange
to contain the first column.
=QUERY(importrange("Link1","Sheet!A1:H"),CONCATENAR("SELECT Col7, Col8 WHERE Col2='",A1,"'"),1)
Upvotes: 0
Reputation: 4630
Since the query is loading data via importrange, you need to use the other select notation, Col1,Col2
rather than A,B
.
Hence, instead of select G,H where B
you would use select Col7,Col8 where Col2
.
In addition, "Criteria_to_meet"
would most likely need to be ""Criteria_to_meet""
(double quotes x 2) or 'Criteria_to_meet'
(single quotes).
Upvotes: 1