Sheetsdrill

Level 4: Arrays and FILTER Exercise 66 of 92

QUERY with a cell in the where clause

A Google Sheets formula exercise from Sheetsdrill. Solve it with a formula bar on a live sheet in your browser, and it is checked the moment you submit.

The task

Use QUERY to add up the sales of the region typed in F1, with no header row. The region must come from the cell: join F1 into the query text instead of typing the name. Answer in F2.

What this exercise teaches

The query is ordinary text, so a cell is joined into it with &. A text value still needs its single quotes around it; a number would be joined without them.

A hint if you get stuck

Close the query text, join the cell, and open it again: "... where A = '"&F1&"' ...". The single quotes stay inside the text because the region is a text value.

Functions used: QUERY

Try it now, free, no account needed

Your first 15 exercises on Sheetsdrill are free. Open it on the practice page, solve it, and get instant feedback with a hint. A free account adds the worked solution; Pro unlocks every exercise, timed mode and the certificate.

Open this exercise

More exercises in Arrays and FILTER