The short answer
ChatGPT works with Excel in two ways: OpenAI's ChatGPT for Excel add-in, which edits your workbook from a sidebar and is listed on every plan from Free to Enterprise, and data analysis in the chat, where ChatGPT runs Python on an uploaded .xlsx or .csv file. The best prompts name the exact ranges, say what must not change, ask for a plan before big edits and ask for a list of changed cells. The 14 prompts here cover formulas, cleaning, pivots, macros, analysis and charts.
Two ways to use ChatGPT with Excel in November 2026
OpenAI's ChatGPT works with spreadsheets in two different places, and the right prompt depends on which one you use.
- ChatGPT for Excel is OpenAI's own add-in. It sits in a sidebar inside Excel on the desktop or the web and can build, update and explain your workbook directly, including large files with many tabs. To install it, open Excel, go to Home > Add-ins, search for ChatGPT, add it, open it from the ribbon and sign in. OpenAI's help centre lists it on every plan: Free, Go, Plus, Pro, Business, Enterprise, Edu and K-12. Free and Go get limited usage, and Plus and Pro use it within their agentic usage limit. On workspaces that use role-based access, an admin may need to enable it first. A matching ChatGPT for Google Sheets add-in works the same way.
- Data analysis in the ChatGPT chat: upload an .xlsx, .xls or .csv file and ChatGPT writes and runs Python to summarise it, find trends and outliers, build tables and draw charts. Bar, line, pie and scatter charts can be switched to an interactive version with Switch to interactive chart. This route returns analysis and files, not edits to your open workbook.
A rule of thumb: use the add-in when you want the workbook itself changed, and use the chat when you want answers about the data or a new file. On models, Free and Go use GPT-6 Luna in the Chat tab, and Plus, Pro, Business and Enterprise get GPT-6 Sol. Our ChatGPT guide covers the plans in detail, and the free ChatGPT course walks through uploads and data analysis step by step.
ChatGPT prompts for Excel formulas
Formulas are where most people start, and where a vague prompt costs the most time. Tell ChatGPT your Excel version (Microsoft 365, Excel 2021 or older), the exact cell ranges and what each column holds. Without the version, you may get a dynamic array function your copy of Excel does not have. The debugging prompt mirrors one of OpenAI's own example prompts for the add-in: ask why a cell shows an error and to explain the formula chain, not only to fix it. Understanding the chain stops the same error reappearing next month.
ChatGPT prompts for cleaning data
Cleaning is the most boring part of spreadsheet work and the best one to hand over. In the add-in, OpenAI's advice is to be specific about what to preserve, what to overwrite and where, and to ask for a plan before big edits. The cleaning prompts below follow that advice: they ask ChatGPT to list the problems it finds first, then change only the columns you name, then report every change. Duplicate the file before you start. OpenAI recommends this for important work so you can go back if an edit goes wrong.
ChatGPT prompts for pivot tables and summaries
OpenAI's help article does not say the add-in creates PivotTable objects, so these prompts take two safe routes. One asks for exact click-by-click steps to build the PivotTable yourself, which works on any plan. The other asks for a formula-based summary table using SUMIFS or, if your Excel has them, the GROUPBY and PIVOTBY functions, which update automatically when the data changes. In the chat, you can also upload the file and ask ChatGPT to calculate the summary with Python and return it as a new sheet.
ChatGPT prompts for VBA macros and Office Scripts
OpenAI's help centre is clear that VBA and macros may not be fully supported in the add-in, so write automation in the ChatGPT chat and paste it into Excel yourself. Use VBA for desktop Excel on Windows or Mac, and Office Scripts (TypeScript, from the Automate tab) when the workbook lives in Excel for the web or you want to run it from Power Automate. The prompts ask for comments on every block, a test on a copy of the file and no actions that delete data without a warning. Never run a macro you do not understand on the only copy of a file.
ChatGPT prompts for analysing uploaded spreadsheets
For analysis, the chat's Python environment is the strongest part of ChatGPT. OpenAI's tips for good results: descriptive column headers in the first row, one record per row, no empty rows or columns splitting the data and no values hidden in images. Name the columns, calculations and groupings you want, because ChatGPT may pick a method you did not intend on the first try. Ask to see the code when the method matters. Two limits to know: the analysis environment cannot fetch data from the web, so upload everything it needs, and ChatGPT may not read exact values from scanned tables reliably.
ChatGPT prompts for charts
ChatGPT draws charts from uploaded data in the chat, and the add-in can add charts to the workbook. The chart prompts name the chart type, the axis and the message the chart should make obvious, which is the difference between a chart that decorates a slide and one that makes a point. If ChatGPT picks the wrong chart type, say which one you want; OpenAI notes that it may choose a type that does not match your intent first time.
How to adapt these prompts
- Name the ranges and tabs. In the add-in you can @ mention specific sheets to focus the prompt. In the chat, describe the columns.
- Say what must not change. "Don't change formatting" and "Inputs tab only" are OpenAI's own examples, and they stop ChatGPT rewriting more than you asked.
- Ask for a plan before large edits, then approve it.
- Ask for a change log. A list of changed cells makes review fast.
- Check the numbers. OpenAI says outputs may be incomplete or incorrect and to review formulas, calculations and changed cells before relying on them.
Privacy: add-in chats are separate from your ChatGPT chat history and have no access to memory. OpenAI says some data logs may be kept for 30 days for safety, and that under Microsoft's add-in marketplace terms Microsoft may be able to read workbook content and prompts. On Free, Go, Plus and Pro, chats can be used for training unless you turn off Improve the model for everyone in Settings > Data controls; Business and Enterprise are not used for training by default.
ChatGPT or Copilot for Excel: which works best
Pick ChatGPT if you already pay for ChatGPT, use Excel without a Microsoft 365 Copilot licence or want strong Python analysis of an uploaded file. The add-in is on every ChatGPT plan, including Free with limited usage. Pick Microsoft Copilot in Excel if your company already licenses it, because it is built into Excel and covered by Microsoft's enterprise data protection for work accounts; our Copilot prompts for Excel are written for it. For the full ranking, read the best AI for spreadsheets, and for the head-to-head see ChatGPT vs Copilot. If you are new to all of this, start with how to use AI for Excel.
Prompts to copy
Write a formula from a plain description
I use [Excel version, e.g. Microsoft 365]. My data is on the sheet [sheet name]: column A is [what it holds], column B is [what it holds], column C is [what it holds], rows 2 to [last row]. Write a formula for [cell] that [what you want, e.g. returns the total sales for the region in F2 in the month in G2]. Explain in plain English how it works, and give one alternative that works in older Excel versions.
You get: A working formula for your exact ranges, a plain explanation and a fallback for older Excel
Fix an error and explain the formula chain
Why am I getting [error, e.g. #N/A or #VALUE!] in cell [cell] on the [sheet name] sheet? Trace the formula chain back through every cell it depends on, explain where it breaks and propose a fix. Do not change anything until I confirm.
You get: The cause of the error traced through the precedent cells, and a proposed fix waiting for your approval
Replace nested IFs with something readable
Here is a formula from my workbook: [paste formula]. It [what it is meant to do]. Rewrite it so a colleague can read it, using IFS, SWITCH, XLOOKUP or LET where they help and my Excel version supports them ([Excel version]). Show the old and new formulas side by side and give three test inputs that prove both return the same result.
You get: A simpler, equivalent formula with test cases you can use to confirm nothing changed
Clean a messy sheet safely
Clean up the [sheet name] sheet. Before editing, list every problem you find: inconsistent labels, extra spaces, mixed date formats, numbers stored as text, duplicates and broken formulas. Then outline exactly which columns and ranges you will change. Wait for my OK. After editing, list every change. Do not change formatting or any other sheet.
You get: A list of data problems and a plan first, then a clean sheet with a log of every change
Standardise names and categories
Column [column letter] on [sheet name] holds [what it is, e.g. company names] typed by different people, so the same item appears in several spellings. Group the values that refer to the same thing, propose one standard spelling for each group and show me the mapping as a table before changing anything. Put the cleaned values in a new column next to the original.
You get: A mapping of messy values to standard ones for review, and a new clean column that keeps the original
Step-by-step PivotTable instructions
My data is a table on [sheet name] with these columns: [list columns]. I want a PivotTable that shows [what you want, e.g. total revenue by region in rows and by quarter in columns, with a filter for product line]. Give me the exact click-by-click steps in [Excel version, desktop or web], what to put in Rows, Columns, Values and Filters, and how to show values as [sum, average or % of total].
You get: Exact steps and field settings to build the PivotTable yourself in your version of Excel
Build a summary table that updates itself
Create a summary on a new sheet called [name] that shows [measure, e.g. total sales] by [field 1] and [field 2] from the data on [sheet name]. Use formulas rather than a PivotTable so it updates automatically: GROUPBY or PIVOTBY if my Excel supports them ([Excel version]), otherwise SUMIFS with a unique list. Add a grand total and explain the formulas.
You get: A self-updating summary table built from formulas, with an explanation of how it works
Write a VBA macro you can trust
Write a VBA macro for desktop Excel that [task, e.g. copies every row where column D says Approved from the Requests sheet to the Approved sheet, then sorts it by date]. Comment every block. Ask for confirmation before deleting or overwriting anything. Tell me where to paste it, how to run it and how to test it on a copy of the file first.
You get: A commented VBA macro with safety checks and plain instructions to install and test it
Write an Office Script for Excel on the web
Write an Office Script (TypeScript) for Excel on the web that [task, e.g. formats the table on the Report sheet, adds a total row and highlights values over 10,000 in red]. Comment each step, handle the case where the sheet or table does not exist and tell me how to add it from the Automate tab and run it. Keep it compatible with running from Power Automate.
You get: A commented Office Script with error handling and steps to add and run it
First look at an uploaded spreadsheet
I have uploaded [file name]. Before any analysis, tell me: how many rows and columns each sheet has, what each column seems to contain, any missing values, duplicates or odd entries, and which columns look like dates, numbers or categories. Then suggest five questions this data could answer for [my goal, e.g. our quarterly sales review].
You get: A quick profile of the data with quality problems flagged and useful questions to ask next
Find trends and outliers
Using the uploaded file, analyse [measure] over [time column] by [category column]. Show the overall trend, the three categories that grew fastest and slowest, and any outliers more than [threshold] away from normal. Put the results in a table, show the Python code you used and state any assumptions you made about the data.
You get: Trends, top and bottom movers and outliers in a table, with the code and assumptions shown
Explain an unfamiliar model
I have inherited this workbook. Explain how it works: what each tab does, where the inputs are, which cells drive the main outputs, the key formulas and any hard-coded numbers that look like assumptions. List anything that looks risky, such as formulas that skip rows or references to other files. Do not edit anything.
You get: A plain-English tour of an inherited workbook with its drivers, assumptions and risks
Make a chart that makes one point
From the data in [sheet name or uploaded file], make a [chart type, e.g. line chart] of [measure] by [dimension] for [period]. The point the chart should make obvious is: [message, e.g. that returns doubled after the March price change]. Write that message as the chart title, label the axes with units, use one highlight colour for the key series and grey for the rest.
You get: A focused chart with a message title, clear labels and colour used only where it matters
Build a simple dashboard sheet
Create a new sheet called Dashboard from the data on [sheet name]. Include four headline numbers ([list them]) in large cells at the top, a chart of [measure] over time and a chart of [measure] by [category]. Use formulas linked to the data so it updates, and keep a consistent, plain format. Before building, outline the layout and wait for my OK.
You get: A plan for a one-page dashboard, then a linked dashboard sheet with headline numbers and two charts
Free on Yuzoki Learn