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.
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 exerciseMore exercises in Arrays and FILTER
- Sum a filtered list
- Two conditions in FILTER
- Distinct customers
- Best seller with SORT
- Top three deals with SORTN
- Revenue with ARRAYFORMULA
- Codes that are too long
- QUERY for a total
- Top region with QUERY
- Count with QUERY
- Either region with FILTER
- Distinct products in a region
- Revenue above a minimum quantity
- Average since a date with QUERY
- QUERY with contains
- A sorted list from QUERY
- Total overspend with ARRAYFORMULA
- Distinct values in order