Prompt hub
8 AI prompts for Excel and data analysis (copy-ready and tested)
Excel and SQL work is full of formulas, pivot tables and summaries that are easy to describe in plain English but fiddly to write correctly from memory. A language model is a fast way to get a working formula or query draft, provided you then check it against a small sample of your real data before trusting it on the full dataset.
The prompts here cover an Excel formula built from a plain description, a data-cleaning plan, a pivot table and summary, a chart recommendation for a given dataset, an explanation of an existing formula, a SQL query built from a business question, a data dictionary, and an insight summary written for a non-technical audience. They work with ChatGPT, Claude and Gemini; describe your columns, data types and goal in the fill-in fields so the formula or query matches your actual sheet or table.
Two pitfalls are worth flagging. A model cannot see your actual spreadsheet or database, so any formula, join or filter condition needs testing against a real sample before you trust the result — a plausible-looking VLOOKUP or JOIN can still reference the wrong column. And summary language pulled from a small or unrepresentative sample can overstate a trend that is not really there, so check any "insight" against the full dataset, not just the rows you described. Use the free optimiser on a prompt that keeps returning the wrong formula shape — it usually flags a missing detail about your columns.
All 8 prompts
-
Recommends exactly one chart type for a specific dataset and question, with the axis mapping and one reason to reject the next-best alternative.
View full page →Show prompt
The promptYou are a data visualisation specialist who recommends exactly one chart for a specific question, not a general tour of chart types. Objective: Recommend the best chart type to answer: {{QUESTION THE CHART SHOULD ANSWER — e.g. how has monthly revenue changed across three product lines over the last year?}} Context: Data available: {{DATA DESCRIPTION — e.g. monthly revenue totals for three product lines over 12 months}}. Audience: {{AUDIENCE — e.g. a non-technical leadership team in a five-minute update}}. Constraints: - Recommend exactly one chart type, not a shortlist of options - State the exact axis or encoding mapping (what goes on the x-axis, y-axis, and how categories are distinguished, e.g. colour or separate lines) - Name exactly one commonly suggested alternative chart type for this kind of data, and state one concrete reason it's worse for this specific question - Do not recommend a 3D chart, a dual-axis chart, or a pie chart with more than 5 categories under any circumstances Example: for a trend across categories over time, a multi-line chart is usually right; a stacked bar chart is a common alternative that's worse here because it obscures each line's individual trend. Output format: Return four labelled lines — Recommended chart, Axis mapping, Rejected alternative, Why it's worse — in that order. Before finishing, check the recommendation doesn't fall into a banned chart type and that the rejected alternative is genuinely a common choice for this kind of data, not a straw man. -
Turns a raw table schema into a plain-English data dictionary, one row per column, without guessing at meanings the schema doesn't confirm.
View full page →Show prompt
The promptYou are a data analyst who documents a schema without inventing meaning the schema doesn't actually confirm. Objective: Build a data dictionary for the table(s) below, for {{INTENDED READER — e.g. new analysts joining the team}}. Context: {{TABLE SCHEMAS — paste the table name, columns, types and any sample values}}. Additional notes: {{ADDITIONAL NOTES — e.g. business rules or known quirks worth flagging}}. Constraints: - Produce exactly one row per column supplied; do not merge two columns into one row or add a row for a column that wasn't given - For each column, state its name, data type, a plain-English description, and whether it can be blank or null - If a column's purpose is genuinely unclear from its name, type and any sample values, write "Purpose unclear — confirm with data owner" rather than guessing - Do not state a column's likely source system, update frequency or ownership unless that information was given in the additional notes Example: a column named `cust_flag` with values 0 and 1 and no further context should be marked as unclear, not guessed to mean "is a returning customer". Output format: Return a Markdown table with columns Column, Type, Description, Nullable, one row per supplied column, in the order the columns were given. Before finishing, check the row count matches the number of columns supplied exactly, and that no description states something the schema and notes don't actually support. -
Turns a rough description of a messy dataset into an ordered cleaning plan, listing each fix as a separate, checkable step before analysis starts.
View full page →Show prompt
The promptYou are a data analyst who plans data cleaning as a sequence of checkable steps before touching any analysis. Objective: Produce a cleaning plan for the dataset described below, to prepare it for {{INTENDED ANALYSIS — e.g. a monthly revenue trend report}}. Context: {{DATASET DESCRIPTION — e.g. a CSV export of orders with columns order_id, date, customer_email, region, amount}}. Known issues: {{KNOWN ISSUES — e.g. some dates are text, some emails are duplicated, a few amounts are negative}}. Constraints: - Produce exactly one numbered step per known issue listed above, in the order the issues were listed, plus exactly one final step for a post-clean validation check - Each step must name the specific column affected and the exact action to take on it - Do not propose deleting a row or column unless the known issue explicitly makes that row unusable; prefer a fix over a deletion where one exists - Do not invent an issue that wasn't listed in the known issues above Example: "convert the date column from text to a date type, using the format found in the source" is a specific step; "clean up the dates" is not. Output format: Return a numbered list of steps, each one to two sentences, ending with the validation step described above. Before finishing, check that the number of steps equals the number of known issues plus one, and that every step names a specific column. -
Turns a plain-English description of a calculation into a working Excel or Google Sheets formula, with a one-line explanation of how it works.
View full page →Show prompt
The promptYou are a spreadsheet specialist who writes formulas that work first time, referencing only the columns you're given. Objective: Write a {{SPREADSHEET APPLICATION — e.g. Excel, Google Sheets}} formula that {{DESCRIBE THE CALCULATION}}. Context: {{COLUMN LAYOUT — e.g. column A has order date, column B has region, column C has revenue}}. Constraints: - Reference only the columns named in the context above; do not invent a column that wasn't given - Return exactly one formula, not several alternative versions - Handle blank or zero values explicitly if the result could otherwise divide by zero or return an error - Use functions compatible with the named application only; do not mix Excel-only and Sheets-only functions Example: "the average revenue per region, ignoring blank rows" is specific enough to write directly; "some kind of summary of sales" is not. Output format: Return the formula in a single fenced code block, followed by exactly one sentence explaining what it does in plain English. Before answering, check the formula only references columns named in the context and would not error on a blank input cell. -
Explains what an existing Excel or Sheets formula does, one function at a time, plus the one edge case most likely to break it on real data.
View full page →Show prompt
The promptYou are a spreadsheet specialist who explains formulas clearly to someone who didn't write them. Objective: Explain what the following formula does: {{PASTE THE FORMULA}} Context: This formula is used in {{SHEET CONTEXT — e.g. a monthly finance report, referencing an Orders table}}. The reader's spreadsheet level: {{READER LEVEL — e.g. comfortable with basic formulas like SUM and IF, new to array formulas}}. Constraints: - Break the formula down function by function, in the order they execute (innermost first), not just paraphrasing the whole thing in one go - Use plain language pitched at the stated reader level; do not assume knowledge of a function not already implied by the reader level - Do not guess at what a referenced range or named range contains beyond what's stated in the context; say so explicitly if it's unclear - Identify exactly one edge case (e.g. a blank cell, a text value where a number is expected, a zero) most likely to make this formula error or return a wrong result Example: for a nested IF inside a SUM, explain the innermost IF first, then how SUM aggregates its results. Output format: Return a numbered breakdown of each function used, followed by a separate "Watch out for" section naming the one edge case. Before finishing, check that the breakdown order matches execution order (innermost first) and that exactly one edge case has been identified, not several. -
Prompt: Design a Pivot Table Summary
Score 76Designs the exact rows, columns and values for a pivot table that answers one business question, instead of a vague suggestion to pivot the data.
View full page →Show prompt
The promptYou are a data analyst who designs pivot tables that answer one specific question, not a general-purpose summary of everything in the sheet. Objective: Design a pivot table that answers: {{BUSINESS QUESTION — e.g. which region had the highest average order value each quarter?}} Context: {{AVAILABLE COLUMNS — e.g. order_date, region, product_category, order_value, customer_id}}. Constraints: - Specify exactly one field (or one derived field, named explicitly) for Rows, exactly one for Columns, and exactly one for Values, plus its aggregation (sum, average, count) - Only use columns named in the available columns above; if a needed field must be derived (e.g. quarter from a date), say so explicitly and describe how - Do not propose more than one pivot table; if the question genuinely needs two views, say so as a limitation instead of adding a second table - State one filter to apply, if the question implies one, or state explicitly that no filter is needed Example: "average order value by region and quarter" needs Rows: region, Columns: quarter (derived from order_date), Values: average of order_value. Output format: Return four labelled lines — Rows, Columns, Values, Filter — followed by one sentence stating what the finished pivot table would show. Before finishing, check that every field referenced is either in the available columns or explicitly marked as derived, with the derivation explained. -
Translates a plain-English business question into a runnable SQL query against your schema, plus the one assumption made to resolve any ambiguity.
View full page →Show prompt
The promptYou are a data analyst who turns stakeholder questions into SQL, flagging ambiguity instead of silently guessing at it. Objective: Write a {{DIALECT — e.g. PostgreSQL, BigQuery, Snowflake}} query that answers: {{BUSINESS QUESTION — e.g. which product categories had declining sales quarter over quarter this year?}} Context: {{TABLE SCHEMAS — paste the relevant tables, columns and types}}. Constraints: - Use only the tables and columns given in the schema above; never invent a table or column name that wasn't supplied - If the business question is ambiguous (e.g. "declining" could mean several different comparisons), resolve it with exactly one stated assumption, not several competing interpretations - Use explicit column names, never SELECT *, and add a one-line comment above any non-obvious join, window function or subquery - Handle NULLs explicitly wherever the result could otherwise silently exclude or miscount rows Example: "top customers" is ambiguous between "most orders" and "most revenue"; state which one you're answering and why. Output format: Return the query in a single fenced SQL code block, followed by exactly one sentence stating the assumption made (or "No ambiguity to resolve" if none was needed). Before answering, check every referenced column exists in the given schema and that only one assumption has been stated, not a list of possibilities. -
Prompt: Write an SQL Query
Score 80A prompt that gets a correct, readable SQL query on the first try by giving the model your schema and edge cases up front.
View full page →Show prompt
The promptYou are a database engineer who writes SQL that's easy for the next person to read. Objective: Write a {{DIALECT — e.g. PostgreSQL, MySQL, SQLite}} query that {{DESCRIBE WHAT THE QUERY SHOULD RETURN}}. Context: {{TABLE SCHEMAS — paste the columns and types}} Constraints: - Use explicit column names, never SELECT * - Handle NULLs explicitly if the result could contain them - Add a one-line comment above any non-obvious join or subquery - Do not invent column or table names that weren't given Example: "customers who placed more than 3 orders in the last 90 days" is specific enough to write directly; "our best customers" is not. Output format: Return the query in a single fenced SQL code block, followed by one sentence explaining what it does in plain English. Before answering, check the query against the schema given and confirm every referenced column actually exists there.
Frequently asked questions
- Can a model see my actual spreadsheet or database?
- No, unless you paste in a sample of the real data or describe your columns precisely — without that context, a formula or query prompt can only guess at your structure.
- Is a generated SQL query safe to run on production data?
- Test any generated query against a copy or a small sample first; a plausible-looking JOIN or WHERE clause can still reference the wrong column or return unintended rows.
- Will these prompts work in Excel, Google Sheets and other tools?
- The formula logic is generally portable, but function names differ slightly between Excel and Google Sheets, so check the exact syntax your tool expects.
- Can I trust an AI-generated data summary?
- Check any stated trend against the full dataset, not just a sample — summaries built from a small or skewed sample can overstate a pattern that is not really there.