Blog › Prompts for your sales apps

AI prompts for Excel

By Corey Leon, founder of Coda · · 5 min read

Get AI to write Excel formulas, explain them and clean up messy lists. Steps plus 4 prompts you can copy into ChatGPT, Claude or Copilot.

Short answer

How do I use AI to write Excel formulas and clean up spreadsheets?

To use AI for Excel, tell ChatGPT, Claude or Copilot your column names, paste 5 to 10 sample rows, and say what you want, like "add up sales by rep for March." The AI writes the formula and tells you where to put it.

For messy lists, paste a sample and ask for the formulas or steps to fix names, dates, spaces and duplicates. If your Microsoft 365 plan includes Copilot in Excel, you can ask it right inside the workbook.

Steps

  1. Describe your sheet. Write down the column letters and what is in each, like "A is customer name, B is order date, C is rep, D is amount." The AI cannot see your file unless you tell it or upload it.
  2. Copy a few sample rows. Select 5 to 10 rows, copy, and paste them into the chat. Remove anything private first, like account numbers or personal phone numbers.
  3. Say what you want in plain words. "Total of column D for each rep in column C" is enough. Say your version of Excel if you know it, since newer versions have functions like XLOOKUP that older ones do not.
  4. Paste the formula in one cell and test it. Check the answer by hand on two or three rows before you copy it down the column.
  5. Ask why if it breaks. Paste the formula and the error, like #N/A or #VALUE!, and ask the AI to fix it.
  6. Use Excel's own tools for big cleanups. For things like duplicates, Excel has Remove Duplicates on the Data tab, and Flash Fill can copy a pattern you type. AI can tell you which tool to use and how.

Prompts you can copy

Write a formula from plain words

Prompt. Paste it into Claude or any AI chat.
You are an Excel expert who explains things simply.

My sheet: column A is [what is in A], column B is [what is in B], column C is [what is in C], column D is [what is in D]. Data starts in row 2 and goes to about row [500].

What I want: [describe the result, for example the total of column D for each rep in column C, only for orders in March 2026].

Give me the formula, which cell to put it in, and a one line explanation of how it works. I use [Excel for Microsoft 365 / Excel 2019 / not sure]. If there is a simpler way, like a PivotTable, tell me.

Sample rows: [paste 5 to 10 rows]

Clean up a messy list

Prompt. Paste it into Claude or any AI chat.
You are helping me clean up a customer list in Excel. Here are sample rows: [paste 10 rows].

Problems I see: names in all caps, extra spaces, phone numbers in different formats, dates written different ways, and some duplicate rows.

For each problem, give me either the Excel formula to fix it in a new column or the menu steps to fix it. Use simple functions like TRIM and PROPER where they work. Tell me the order to do the steps in, and remind me to keep a copy of the original sheet.

Explain a formula someone else wrote

Prompt. Paste it into Claude or any AI chat.
I inherited a spreadsheet and I do not understand this formula: [paste formula].

The columns it uses are: [describe what is in each column it points to].

Explain what it does in plain words, step by step, like you are talking to someone who uses Excel but is not an expert. Then tell me if there is anything that could break it, like blank cells or text in a number column.

Fix a formula that shows an error

Prompt. Paste it into Claude or any AI chat.
This Excel formula gives me [the error, for example #N/A or #VALUE!]: [paste formula].

What is in the cells it uses: [describe them, or paste a few rows].

Tell me the most likely reason for the error in one or two sentences, then give me the fixed formula. If the fix is to handle missing values, show me how to show a blank or "not found" instead of the error.

What does a made-up example look like?

This is a made-up example. Your sheet has rep names in column C and order amounts in column D, and you want each rep's total in a small table. You put the rep names in column F. A good answer from the first prompt is: put =SUMIFS(D:D,C:C,F2) in G2 and copy it down. It adds every amount in column D where the rep in column C matches the name in F2. The AI might also suggest a PivotTable, which does the same thing with a few clicks and no formula.

What tips help?

  • Always tell the AI your column letters. Most formula mistakes come from guessing which column is which.
  • Test on a copy of your file, not the original.
  • Ask for one formula at a time. Long chains of nested formulas are hard to check.

What should you not do?

  • Do not paste a whole sheet with private customer or payroll data into a free AI tool.
  • Do not fill a formula down the whole sheet before checking it on 3 rows.
  • Do not trust a total you cannot check. Add up a few rows by hand or with a quick SUM to compare.

FAQ

Does Excel have AI built in?

Copilot in Excel is part of some Microsoft 365 plans. It can help write formulas, find patterns and make charts inside your workbook. Without it, ChatGPT or Claude work well with copy and paste.

Can I upload my Excel file to ChatGPT or Claude?

Yes, both let you upload spreadsheet files on many plans and can read the data. Remove private information first, and still check the results in Excel.

What is the most useful formula to learn?

For sales and office work, SUMIFS and XLOOKUP cover a lot. SUMIFS adds things up by rules, and XLOOKUP finds a value from another list. Ask the AI to explain them with your own columns.

Why does the AI formula not work in my Excel?

You may have an older version that does not have that function. Tell the AI your version and ask for a formula that works in it.

excelspreadsheetsformulasdata cleanup

First posted . Last updated .

Read next

Want us to run this for you?

Book a call. We'll look at who you sell to and your offer, and tell you straight where to start.

Book a discovery call