Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

QUERY Select cells equals to an array from another tab

I want to import in a google sheet , the data of URLTab, only where Col 1 is equal to the column A of Tab2.

When I use the following formula, refering to only the first row of Tab2, it works fine.

=QUERY(Importrange("URL";"URLTab!A3:P");"select * where Col1 =  '"&Tab2!A2& "'")

When I try to refer to the whole column A, it gives an error :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

=QUERY(Importrange(""URL";"URLTab!A3:P");"select * where Col1 is not null and Col1 matches'"&JOIN("|",  '"&Tab2!A2:A6& "'")"))

Could you please help me on the 2d formula ?

Thank you

>Solution :

You have some extraneous single and double quotes within the JOIN. At a guess, try this:

=QUERY(Importrange("URL";"URLTab!A3:P");"select * where Col1 is not null and Col1 matches '"&JOIN("|";Tab2!A2:A6)&"'")
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading