I'm trying to write an intersection query in Google Sheets that lists all the rows in sheet 1 that contain a cell in sheet 1, column A, that matches at least one cell in sheet 2, column P
This is the first time I've tried writing a more advanced formula on Google Sheets, using a combination of Sheets functions and the Google Visualization API Query Language. I'm just starting to learn the syntax and everything and I'm sure I'm messing things up so I hope someone can point out what I'm doing wrong. My current query is:
=QUERY('Sheet1'!A1:T, "SELECT * WHERE (VLOOKUP(A, 'Sheet2'!P, 1, FALSE) IS NOT NULL)", 1)
(VLOOKUP(A, 'Sheet2'!P, 1, FALSE)
is not a valid Google Query clause. As a Google Sheets formula it has reference errors asA
and'Sheet2'!P
aren't valid references.