How to Use ChatGPT to Create Excel Formulas and Reports

Short answer: Describe your columns and the result you want in plain words, name the spreadsheet app and version, and ask for the formula plus a short explanation. Then test it on a few rows you can check by hand before you trust it on the whole sheet.
Why ChatGPT helps with spreadsheets
Most people know what they want from a sheet but not the exact formula. ChatGPT turns a plain description into syntax. It can also explain a formula you inherited, suggest a cleaner way to write it and draft a report layout. It does not see your file unless you paste data or upload it, so it works from your description. That is why a clear description matters.
How to ask for a formula

Give it four things:
- 1The app: Excel (and version if you know it), Google Sheets or LibreOffice. Functions differ.
- 2The layout: which column holds what, and which row the data starts on.
- 3The result: what the formula should return and where.
- 4Edge cases: blanks, text in number columns, duplicates.
Example prompt: In Excel 365, column A has dates from A2 down, column B has region names and column C has sales amounts. Write a formula for cell F2 that sums sales for the region typed in E2 during the month of the date typed in G2. Explain each part.
A good answer will use SUMIFS with date boundaries. It should tell you which cells to change.
Formulas people ask for most
Lookups
Prompt: In Excel 365, I have a price list in Sheet2 columns A (product code) and B (price). In Sheet1 column A has product codes. Write a formula for B2 that returns the price and shows "not found" if the code is missing.
You will usually get XLOOKUP with an if-not-found argument, or INDEX and MATCH for older versions. Say which version you use.
Conditional sums and counts
Prompt: Count how many rows in column D contain "Paid" and column F is later than today. Use COUNTIFS.
Text clean-up
Prompt: Column A has full names like "SMITH, John". Write formulas to split into first name and last name and fix the capitalisation.
Dates
Prompt: Column B has start dates. Write a formula that returns the number of working days between the start date and today, excluding weekends.
Percentages and growth
Prompt: Column B has this month's revenue and column C has last month's. Write a formula for D2 that returns percentage change and shows a dash if last month is zero.
Building a report
Use ChatGPT to plan the report, then build it in the sheet.
Prompt: I have a sales sheet with date, region, product, units and revenue. I want a one-page monthly report for a manager. Suggest the layout, the five most useful measures, the pivot table setup and two charts. Explain how to build each in Excel 365.
Follow the steps in the app. If a step does not match your screen, tell ChatGPT what you see. It can adjust.
Pivot tables
Ask for the exact setup: which field goes in Rows, Columns, Values and Filters, and how to group dates by month. Pivot tables are often the fastest route to a report.
Charts
Ask which chart fits the question. "Compare regions" suits a bar chart. "Show change over time" suits a line chart. Ask for titles and labels that a manager can read in five seconds.
Clean messy data
Describe the mess: extra spaces, mixed date formats, duplicates, numbers stored as text. Ask for the steps in Excel, such as TRIM, Text to Columns, Remove Duplicates or Power Query. Do the steps on a copy of the sheet.
Explain a formula you did not write
Paste the formula and ask: "Explain this formula step by step in plain English and tell me what could break it." It is useful when you inherit a workbook.
Test every formula

A formula that returns a number is not always right. Use this checklist:
- 1Try three rows by hand. Work out the answer yourself and compare.
- 2Check blanks and text. Do empty cells or "N/A" break it?
- 3Check edge cases. Month ends, zero values, duplicates, negative numbers.
- 4Lock and document. Use absolute references where needed ($A$1) and add a note saying what the formula does.
Privacy and safety
- Do not paste customer names, payroll, health data or confidential figures into a tool your organisation has not approved. Use dummy data that has the same layout.
- Do not run macros or scripts you do not understand. Ask for an explanation first, and test on a copy.
- Keep a backup of the file before big changes.
Common mistakes
- Not saying which app or version, so the formula uses a function you do not have.
- Vague column descriptions, so the formula points at the wrong column.
- Trusting the result without testing.
- Overly long formulas. Ask for a version split into helper columns that you can read.
- Forgetting that Google Sheets and Excel differ in some functions and in how arrays work.
FAQ
Can ChatGPT write Excel formulas?
Yes. Describe the columns and the result and name your app. Test the result before you rely on it.
Can ChatGPT build a pivot table for me?
It can tell you exactly how to set one up, step by step. You build it in Excel.
Why does the formula ChatGPT gave me not work?
Often the app version does not support the function, a cell reference is wrong or the data has hidden text or spaces. Tell ChatGPT the error message and the formula and ask for a fix.
Is it safe to upload my spreadsheet to ChatGPT?
Only if your organisation allows it and the data is not confidential. Otherwise use a small sample with fake values.
Does it work for Google Sheets?
Yes. Say "Google Sheets" in the prompt, since some functions differ.
Key takeaways
- Name the app, describe the layout and the result you want.
- Ask for an explanation along with the formula.
- Test on a few rows by hand.
- Use dummy data for anything confidential.
Want reports like these built and updated automatically? Book a free 30 minute call with Tech AI Labs.
FAQ
Quick answers
Can ChatGPT write Excel formulas?
Yes. Describe the columns and the result and name your app. Test the result before you rely on it.
Can ChatGPT build a pivot table for me?
It can tell you exactly how to set one up, step by step. You build it in Excel.
Why does the formula ChatGPT gave me not work?
Often the app version does not support the function, a cell reference is wrong or the data has hidden text or spaces. Tell ChatGPT the error message and the formula and ask for a fix.
Is it safe to upload my spreadsheet to ChatGPT?
Only if your organisation allows it and the data is not confidential. Otherwise use a small sample with fake values.
Does it work for Google Sheets?
Yes. Say "Google Sheets" in the prompt, since some functions differ.
IN THE DIRECTORY
See how this tool compares, what it costs and what it is best for.
Open the tool page →

