I'm trying to write a query function that selects a value from a column on a different sheet where a different column from the same sheet is equal to a cell on the target sheet.
Here's my attempt at trying to show this with code:
=QUERY(OtherSheet!D:E,"Select E where (D = D8)")
D8 is the cell from the target sheet that I want to reference.
should be:
=QUERY(OtherSheet!D:E, "select E where D = "&D8)
if D8 is a numeric value
otherwise, if D8 is plain text it should be:
=QUERY(OtherSheet!D:E, "select E where D = '"&D8&"'")