Google Sheets QUERY formula generator

Write a Google Sheets QUERY formula without memorizing SQL syntax.

Describe the rows and columns you want, paste sample headers, and get a QUERY formula with notes for select clauses, where filters, sorting, grouping, and labels.

Request

Formula request

2 guest tries left
Mode
Spreadsheet
Upgrade $9

Purpose-built inputs

A focused workflow for everyday spreadsheet work.

Structured formula builder

Task, table context, target range, and function hint keep the request specific.

Write / Explain / Fix modes

Generate a new formula, translate a pasted one, or diagnose common syntax issues.

Excel and Sheets toggle

Compatibility notes call out modern functions and platform-specific behavior.

Formula-bar output

The result is formatted for scanning and placed next to a copy button.

Common formulas

Pick the formula you came for.

Percentage formulas

Build percent of total, percent change, discount, markup, tax, tip, and completion-rate formulas.

Date formulas

Create due dates, workday counts, month-end dates, date differences, and overdue checks.

FILTER formulas

Return matching rows for status, region, date, text, and threshold conditions.

Text formulas

Split, extract, join, trim, clean, and replace text from messy imported cells.

Data validation formulas

Block bad IDs, duplicate values, missing fields, and invalid entries with custom TRUE/FALSE rules.

XLOOKUP formulas

Return matching values with separate lookup and return ranges.

INDEX MATCH formulas

Build flexible lookup formulas for left lookups, two-way lookups, and older Excel files.

SUMIFS formulas

Total rows that match status, date, category, customer, or region rules.

Use case

Google Sheets QUERY formula generator for spreadsheet work.

Build Google Sheets QUERY formulas for report-style views that select, filter, sort, group, or relabel columns from a source table.

What this page gives you

  • A draft QUERY formula matched to the columns, filters, sort order, and labels you describe.
  • A plain-English read of the select, where, order by, group by, or label clauses.
  • Checks for header rows, quoted text criteria, and whether column letters or Col1-style references fit the source range.

When to use it

Use this page when Google Sheets needs a report-like output from a source table, such as open deals by region, late tasks by owner, grouped totals by month, or selected columns sorted by a metric.

Do not use QUERY just to return a few matching rows when FILTER is simpler and easier for the team to edit. QUERY is strongest when the output needs SQL-like select, where, order by, group by, or label clauses.

Worked example

For deals in A1:D500 with headers in row 1, a QUERY formula can show only open West-region deals above 5000 and sort the highest value first.

=QUERY(A1:D500,"select A, B, C, D where B = 'West' and C = 'Open' and D > 5000 order by D desc",1)

The formula reads the source table, keeps the requested columns, filters to West open deals over 5000, sorts by value descending, and treats the first row as headers.

Check before you paste

  • QUERY uses Col1-style references when the source range is an array expression.
  • Text criteria need single quotes inside the query string.
  • Set the header-row argument correctly so Sheets does not treat a data row as headers.

Upgrade when the work piles up

Keep going when the sheet gets complicated.

Try twice as a guest. Free accounts get 3 runs per week plus a monthly product email. Upgrade when formula work becomes a recurring part of the week.

Founding access

$9

500 formula runs per month in this browser, early access pricing, and account access as it ships. Stripe redirects you back after payment.

Upgrade with Stripe