Guides

AI prompts for spreadsheets (Excel & Google Sheets)

18+ copy-paste prompts for Excel and Google Sheets. 76% of analysts still rely on spreadsheets for data prep (Alteryx, 2025); paste columns and ship faster.

June 10, 2026

Spreadsheet work is full of small, repeatable asks: write one more formula, fix the error that broke a column, clean a messy export, or summarize what a sheet is telling you. An AI assistant is good at all of these once you give it the right context. The trick is to describe your columns and a few sample rows, then ask for exactly the formula, fix, or summary you need.

The 18+ prompts below are grouped by the work you actually do in a sheet, with the parts that change wrapped in [brackets] so you fill blanks instead of rewriting instructions. They are not theoretical. Reliance on spreadsheets is still wide: 76% of analysts say they still rely on spreadsheets for data prep, and 45% spend six or more hours a week on data cleaning (Alteryx, 2025). These prompts are how you cut into that without learning a new tool.

Key Takeaways

  • 76% of analysts still rely on spreadsheets for data prep and 45% spend 6+ hours a week cleaning data (Alteryx, 2025), so a reliable set of prompts pays off fast.
  • Paste your column names and two or three sample rows first, then ask for a formula, a fix, or a summary, so the answer fits your exact sheet.
  • The prompts work the same in ChatGPT, Claude, Gemini, Perplexity, and Deepseek alongside Excel or Google Sheets, so you keep one version of each.
  • Never paste sensitive data; use fake sample rows that match your structure instead.

Performance analytics charts on a laptop screen.

The point is not to hand your whole spreadsheet to an AI. It is to get a correct formula or a clear explanation in seconds on tasks that otherwise mean trial and error. Before you save any of these, our guide to writing better AI prompts covers what separates a vague request from one that returns something you can paste straight into a cell.

How do you get a working formula from a prompt?

Use these when you know what you want a cell to do but not the syntax. Name your columns and what you want returned, and say whether you are in Excel or Google Sheets, since a few functions differ.

Write an [Excel / Google Sheets] formula that [does X], given columns
[A = ..., B = ..., C = ...]. Return the formula only, then one line on what it does.
In [Google Sheets], I have [date] in column A and [amount] in column B.
Write a formula that sums [amount] for rows where [date] falls in [the current month].
Explain which function does the filtering.
Write an [Excel] formula to look up [value] from column [A] and return the matching
[value] from column [C]. Use [XLOOKUP] and handle the not-found case with [a blank].
I want a column that flags rows as "[High / Medium / Low]" based on [column B]:
[over 1000 = High, 100 to 1000 = Medium, under 100 = Low].
Write the [Sheets] formula and tell me where to put it.

How do you fix a formula or error with AI?

Use these when a formula is throwing an error or returning the wrong result. Paste the formula and the error text, and describe what you expected, so the model can spot the mismatch.

This [Excel] formula returns [#REF! / #VALUE! / wrong number]: """[paste formula]"""
The columns are [A = ..., B = ...]. I expected [result]. Find the cause and give me a
corrected formula.
Explain what this formula does, step by step, in plain language: """[paste formula]"""
Then tell me one thing that could make it break.
This [VLOOKUP / XLOOKUP] is returning [#N/A] for some rows. Columns: [describe].
List the likely reasons in order of probability and how to test each one.
Rewrite this formula to be shorter and easier to read without changing the result:
"""[paste formula]""". Explain what you changed and why.

How do you clean and standardize messy data?

Use these on exports and pasted data that need tidying before you can trust them. Describe the mess (mixed date formats, extra spaces, inconsistent labels) and the format you want.

Column [A] has [names / dates / phone numbers] in inconsistent formats:
[paste 3-4 sample values]. Write a [Sheets] formula to standardize them all to
[the format you want]. Show the result for each sample.
I have a [Name] column with full names. Write a formula to split it into
[First] and [Last] columns. Handle middle names by [putting them with the first name].
Some cells in column [B] have leading/trailing spaces and mixed capitalization.
Write a formula to clean them to [Title Case with no extra spaces].
Column [C] mixes text and numbers like [paste examples]. Write a formula that
extracts just the [number] from each cell. Tell me what to do with cells that have none.

Keep your best spreadsheet prompts one click away

Promptly saves your prompts and runs them across every AI tool you work in.

How do you summarize a sheet and find insights?

Use these when you have clean data and want to understand it. Paste your headers and a sample of rows, and ask for the pattern, not just the numbers.

Here are my column headers and [5] sample rows: """[paste]""".
Summarize what this data represents and the [3] most useful questions I could answer
with it. Do not invent values beyond the sample.
Given columns [A = category, B = amount, C = date], tell me how to find
[the top 3 categories by total amount] and [the month with the highest total].
Give the formulas and where to put them.
I'll paste [20] rows of [sales / survey] data. Identify any outliers or odd patterns,
explain why each stands out, and suggest one follow-up check for each. Data: """[paste]"""

These summary prompts transfer across assistants without changes, so the same set works in ChatGPT, Claude, Gemini, Perplexity, and Deepseek. For more reusable everyday patterns beyond spreadsheets, our roundup of prompt templates that save time covers jobs like summarizing and drafting.

How do you plan a pivot table or summary?

Use these when you need a rollup but are not sure how to structure it. Describe your columns and the question, and let the model lay out the pivot before you build it.

I have columns [A = region, B = product, C = revenue, D = date].
Tell me how to build a [pivot table] that shows [total revenue by region and product].
List the rows, columns, and values to drag, step by step for [Google Sheets].
I want a monthly summary table from raw rows with columns [date, channel, amount].
Describe the [pivot / SUMIFS] setup to show [total amount per channel per month].
Give the formula version too, in case I skip the pivot.

How do you generate sample data or a regex?

Use these to build test data or pattern-match text. For sample data, say the columns and how many rows; for regex, give real examples of what should and should not match.

Generate [15] rows of realistic but fake [customer] sample data with columns
[name, email, signup date, plan]. Output as a table I can paste into [Sheets].
Use only made-up values.
Write a regex that matches [what you want, e.g. order IDs like AB-12345].
It should match: [paste 2-3 examples]. It should NOT match: [paste 2-3 examples].
Explain the pattern in one line and how to use it in [Sheets REGEXEXTRACT].
I need to validate that column [A] contains [valid email addresses].
Write a [Sheets] formula using regex that returns TRUE/FALSE per row,
and show the result for these samples: [paste 3-4 values].

A quick note on privacy: do not paste sensitive data (real customer records, financials, anything confidential) into an AI tool. You almost never need to. Replace real values with fake sample rows that match your structure, get the formula or plan, then apply it to your actual sheet yourself. The model only needs the shape of the data, not the data. For more on building prompts you can reuse safely, see our AI prompt examples.

How do you save the winners and reuse them?

A prompt only saves time if you can reach it in a second. The trap with a notes app or a sticky tab is that it lives somewhere else, so reusing a prompt means switching windows, finding it, copying, and pasting before you start. That copy-paste tax eats the time the prompt was meant to save, and on a team it means everyone rebuilds the same formula prompts on their own.

The fix is to keep the prompts that work in one place you can reach wherever you are, instead of a separate copy per tool. When a cleanup prompt or a lookup prompt produces the right formula, save that exact version so next time you start from your best attempt. Even small recurring savings add up: Microsoft found that 11 minutes saved a day adds up to 10 hours over 11 weeks (Microsoft, 2024). A practical starting point: pick the five prompts above you would use this week, store them together, and add new ones only after they have worked more than once. Analysts who write a lot of logic and queries will find deeper patterns in our guide to prompt engineering for developers.

Frequently asked questions

Can AI actually write correct spreadsheet formulas?

Yes, when you give it the context it needs: your column names, what each column holds, a few sample rows, and whether you use Excel or Google Sheets. With that, it returns a working formula plus a short explanation you can verify. The failures come from vague asks like 'write a formula to summarize this' with no columns named. Treat the output as a draft, test it on a couple of rows, and save the prompt once it works.

Do I need to paste my whole spreadsheet?

No, and you should not. The model only needs the structure: your column headers and two or three sample rows that match the real shape. That is enough to write a formula or plan a pivot. Pasting the full sheet adds no accuracy and risks exposing data you do not need to share. Use fake sample values, get the formula, then apply it to your real data yourself.

Is it safe to paste data into ChatGPT or Claude?

Treat anything confidential as off limits: real customer records, financials, or proprietary numbers. You rarely need them. Replace real values with made-up sample rows that match your columns, get the formula or summary, then run it on your actual sheet locally. The prompts here are built so the AI works from the shape of your data, not the data itself.

Will these prompts work in both Excel and Google Sheets?

Mostly yes, because the bracketed structure is the same. The one thing to specify is which tool you use, since a few functions differ between them (for example, some lookup and array functions). Each prompt above includes an [Excel / Google Sheets] bracket for exactly that reason. State your tool and the model returns syntax that fits, so you keep one version of each prompt rather than two.

How do I keep spreadsheet prompts handy across my tools?

Store the prompts that work in one place you reach wherever you write, instead of a doc you copy from. That removes the window-switching tax and stops each person rebuilding the same formula prompts. When a prompt returns the right formula, save that exact version so you and your team start from it next time. One shared set keeps results consistent across ChatGPT, Claude, Gemini, Perplexity, and Deepseek.

Sources

Try it free

Write better prompts everywhere you chat with AI

Promptly lives in your browser and works with ChatGPT, Claude, Gemini, Perplexity, and more.

Also on Edge and Firefox

Read next