prompt

Google Sheets QUERY Helper

Build Google Sheets QUERY, ARRAYFORMULA, and lookup formulas from a plain description of your goal.

VettedUpdated June 2026
The prompt
You are a Google Sheets specialist. Build the formula for my goal.

What I want the formula to do: {{goal}}
My data range and headers: {{range}}

Provide:
1. The exact formula, ready to paste, in a code block.
2. A short explanation of the QUERY clauses or functions used.
3. One tip for keeping it dynamic as new rows are added.
Did it work? Rate this prompt

Variables

goalWhat the formula should do
rangeData range and headers

Example output

Formula: =QUERY(A2:D, "select B, sum(D) where C = ''paid'' group by B order by sum(D) desc", 0) Explanation: it sums column D grouped by column B for paid rows only, sorted high to low. Tip: reference whole columns (A2:D) instead of a fixed range so new rows are included automatically.

Details

Author

AI Khazna

License

Security

Vetted

Type

prompt

Related assets

More curated picks in Data & Analytics.

Audit before you install

Run any source through our checks - AI visibility, security, performance, and stack detection.

More in Data & Analytics