Google Sheets Query – Cell Reference Guide

google sheetsgoogle-sheets-query

I'm trying to have my query reference a cell, but I keep getting errors:

=query(Sheet1!A3:X2838,"Select I, H, Q, P, J, N, O, S Where (N>10) and (J>"""&K2&""") Order By Q Desc Limit 80")

Best Answer

Replace

J>"""&K2&"""

by

J>"&K2&"

The above because QUERY doesn't require a delimiter for numbers


The spreadsheet doesn't include the formula referred in the question.

It contains =query(Sheet1!A3:X2838,B2) where the content of B2 is not a formula.

Replace the content of B2 by

="Select I, H, Q, P, J, N, O, S Where (N>10) and (J>"&K2&") Order By Q Desc Limit 80"