Reference column based on multiple cell values in Google Query

1.9k views Asked by At

I'm trying to return a value in a column based on two cell references.

My current query is:

=QUERY(A:T,"select A WHERE P = '"&S200&"' AND Q = '"&T200&"'")

Column A is a number, P is a string, and Q is a number. S and T correspond to P and Q, respectively.

All it's returning is column headers. What am I doing wrong?

1

There are 1 answers

0
Ed Nelson On

Try this, Note the different quotes for the cell number reference.

=QUERY(A:T,"select A WHERE P = '"&S200&"' AND Q="&T200&"")