Home > Mobile >  Google Sheets, Select all WHERE cell matches value in a column
Google Sheets, Select all WHERE cell matches value in a column

Time:01-29

I am querying data from a sheet and want to only display the results where column A from that sheet matches the values in a column on the current sheet.

Error Message Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " <UNEXPECTED_CHAR> "! "" at line 1, column 34. Was expecting one of: "group" ... "pivot" ... "order" ... "skipping" ... "limit" ... "offset" ... "label" ... "format" ... "options" ... "and" ...

Here is what I tried:

=QUERY(DFSdata!1:975,"SELECT * WHERE A MATCHES BetMaker!&A1:A15'",1)
=QUERY(DFSdata!1:975,"SELECT * WHERE A MATCHES 'BetMaker!&A1:A15''",1)
=QUERY(DFSdata!1:975,"SELECT * WHERE A MATCHES 'A1:A15'",1)

CodePudding user response:

You can try by referring to those values joined:

=QUERY(DFSdata!1:975,"SELECT * WHERE A MATCHES '"&TEXTJOIN("|",1,BetMaker!&A1:A15)&"'",1)

Let me know!

  • Related