GPTPROMPTS.AI
HOW-TO GUIDE · 2026

How to Use ChatGPT for Excel: 2026 Guide

A workflow for formula help, reviewed automation, and uploaded-file analysis. Match the instructions to your Excel version and test changes before applying them to real workbooks.

Recommended toolSymphony by WixA coordinated team of AI agents for your business, led by Maestro.Get your AI team

Affiliate link, we may earn a commission at no extra cost to you.

Checked September 17, 2026: OpenAI file uploads, data analysis, data controls, and Microsoft XLOOKUP compatibility.

I would use ChatGPT to explain and draft spreadsheet logic, then verify it in a small test. The useful input is a clear layout, an expected result, and relevant edge cases. The useful output is something you can inspect, not a promise that a fluent answer is ready for a business-critical workbook.

This guide separates formula advice from file analysis and shows how to preserve your data while checking changes. The prompts are starting points; their answers still need compatibility, arithmetic, and data-handling review.

Who this guide is for

  • • Office workers and analysts who spend hours each week writing repetitive formulas or doing manual data cleanup that should be automated
  • • Finance and accounting professionals building monthly reports who know what they want but can't always remember which function or syntax gets there
  • • Operations managers working with large exported datasets from CRMs, ERPs, or databases that arrive inconsistently formatted
  • • Small business owners who manage their own Excel tracking but don't want to pay for Microsoft 365 Copilot or hire a consultant for formula help
  • • Data professionals who use Excel alongside Python or SQL and want a faster way to prototype formula logic before formalizing it
  • • Excel power users who know most functions but want to move faster on VBA automation and advanced array formula construction

Why ChatGPT specifically (vs. Microsoft Copilot in Excel)

Start with the task: explaining a formula, analyzing an uploaded table, and working inside a live workbook are different workflows. Check current capabilities and licensing for the tools your organization permits. Do not assume a chat subscription and an Excel integration provide the same access.

Compare tools using the same harmless workbook and expected answers. Check whether they identify blanks, repeated identifiers, mixed dates, and unsupported functions. Record correction effort. This page does not contain a controlled benchmark establishing that ChatGPT writes better VBA or produces more accurate results than Copilot.

A workbook can contain formulas, named ranges, hidden sheets, formatting, and external connections as well as visible data. State what must be preserved and verify the exported result. For formula explanations, a few synthetic rows may be more appropriate than sharing the entire file.

The 8-Step Workflow

01

Tell ChatGPT your Excel version and layout before every session

Give ChatGPT your exact Excel version, platform, locale, and column layout before requesting a formula. Include where data starts and whether the range is an Excel table. Explain how blanks, duplicates, and errors should be handled. This context makes the request less ambiguous but does not guarantee compatibility. Test suggested functions in the target version and keep a small input-and-expected-output example beside the formula. Save the context for recurring work, updating it when the workbook changes.

Example prompt
I'm using Microsoft 365 on Windows. My spreadsheet has: Column A = Customer Name (text), Column B = Order Date (date, MM/DD/YYYY), Column C = Order Amount (currency), Column D = Product Category (text: Hardware / Software / Services). Row 1 is headers. Data starts at row 2 and goes to about row 5,000. Please keep this context for all formulas you write this session.
02

Generate Excel formulas by describing the result you want

Don't ask for a specific formula by name unless you already know it. Instead, describe the result you need and let ChatGPT pick the right function. 'Find the order amount for a specific customer ID' is better than 'write me a VLOOKUP' because ChatGPT will choose XLOOKUP (more robust), INDEX/MATCH (more flexible), or VLOOKUP depending on your Excel version and requirements. When you paste the formula ChatGPT writes, always check the explanation it provides, it will tell you what each argument does, which helps you adapt the formula later. For formulas that combine multiple functions (IF + VLOOKUP, SUMIFS with dates), ask ChatGPT to break it down step-by-step before showing the final combined version. Understanding the logic prevents you from being stuck when the formula breaks.

Example prompt
'Using my column layout above: I need a formula in column E that looks up the customer name in column A against a separate lookup table on Sheet2 (column A = Customer Name, column B = Customer Tier: Gold/Silver/Bronze). If the customer isn't found in the lookup table, show N/A. Use a version-compatible approach for Excel 365.' (Paste this after establishing context in step 1.)
03

Write VBA macros for repetitive tasks

Choose the simplest suitable method before requesting a macro. A formula, built-in formatting rule, or reviewed query may be enough. If VBA is appropriate, specify the target workbook, permitted changes, excluded sheets, and expected result. Request a dry run where practical and review file, network, or email operations. Never enable macros or bypass organizational controls simply because an assistant says the code is safe. Test on a copy and obtain qualified review when the behavior is beyond your understanding.

Example prompt
'Write a VBA macro that does the following on the active sheet: (1) Loops through all rows from row 2 to the last row with data in column A. (2) If the value in column C is less than 0, colors that entire row red (RGB 255, 200, 200). (3) If column C is greater than or equal to 1000, colors the row green (RGB 200, 255, 200). (4) If column C is between 0 and 999, no color change. (5) Skips any row where column A is blank. Add comments explaining each section. The macro should be callable from the ribbon.'
04

Clean messy imported data with formula sequences

Define the transformation before asking AI to clean a column. Keep the source unchanged and write proposed results to helper columns or a separate output. Names, identifiers, phone numbers, and dates need different rules; capitalization changes and numeric conversion can damage valid values. Supply synthetic examples of ordinary and difficult cases. Flag repeated identifiers for review instead of assuming duplicate records. Compare row counts and control totals before accepting the output, and keep an exceptions list for values the approved rules cannot resolve.

Example prompt
'My data in column A has names that are all caps (JOHN SMITH, JANE DOE) with inconsistent extra spaces. Column B has phone numbers in three formats: (555) 123-4567, 555-123-4567, and 5551234567. I want: column D with properly capitalized names (John Smith) and no extra spaces; column E with all phone numbers formatted as 555-123-4567. Write Excel 365 formulas for D2 and E2 that I can drag down.'
05

Debug broken formulas by pasting the error and context

Supply the exact formula, observed result, intended result, and a small reproducible sample. Use fixed dates instead of TODAY() when a test needs to remain stable. Ask for intermediate values before changing the formula. Check whether dates are stored as dates or text, whether ranges align, and whether the function exists in your version. Do not replace Excel's equality operator with a programming-language convention: Excel comparisons use a single equals sign.

Example prompt
In a synthetic test, B2 contains =DATE(2026,1,15) and C2 contains =DATE(2026,2,1). I need elapsed calendar days, excluding the start date. The expected result of =C2-B2 is 17. Explain why a production row containing a text date might behave differently, how to diagnose it without altering the source, and how to test an approved conversion.
06

Build SUMIFS, COUNTIFS, and AVERAGEIFS with multiple conditions

The conditional aggregation functions, SUMIFS, COUNTIFS, AVERAGEIFS, are among the most powerful in Excel and also the most commonly misused. Errors creep in from mismatched ranges, date comparison syntax, and wildcard handling. ChatGPT will write these correctly if you give it the condition logic in plain English. The formula it writes will also teach you the correct syntax for future builds. For date range conditions (sum orders placed in Q1 2026), tell ChatGPT the date format and ask it to use hardcoded dates in the formula first, then show you how to replace them with cell references. For text conditions that include wildcards (any value starting with 'SaaS'), ask explicitly, the asterisk syntax (*SaaS*) is easy to miss. For multi-sheet conditional aggregation, note that SUMIFS doesn't directly support 3D references, ChatGPT will warn you and suggest alternatives.

Example prompt
'Using my column layout (A=Customer Name, B=Order Date, C=Order Amount, D=Product Category): write a SUMIFS formula that totals Column C only where (1) Column D equals "Software", (2) Column B is between January 1 2026 and March 31 2026 (inclusive), and (3) Column C is greater than 500. I want the formula in cell H2. Use cell references for the date range so I can change the dates without editing the formula.'
07

Automate report generation with ChatGPT-written logic

Describe the existing reporting process and choose one repeated calculation to improve first. Keep raw imports separate from outputs, define the period and inclusion rules, and reconcile against a known report. Add refresh and export steps after calculations pass review. Record preparation, correction, and checking time as well as generation time. This guide does not establish a percentage saving or promise that a report can be completed in a particular number of minutes.

Example prompt
'I produce a monthly sales summary on Sheet2 that pulls from raw order data on Sheet1. Sheet1 columns: A=Order ID, B=Sale Date, C=Customer Name, D=Product Line, E=Revenue, F=Sales Rep. Sheet2 shows: Q1/Q2/Q3/Q4 revenue totals by Product Line, top 5 sales reps by revenue per quarter, month-over-month growth %, and average order value by Product Line. Design the formulas for Sheet2 that auto-update when I refresh Sheet1 data. Start with Q1 revenue by Product Line.'
08

Use Advanced Data Analysis mode for actual file uploads

File uploads are available on Free and paid ChatGPT plans subject to account settings and plan-specific limits. Analysis capabilities also depend on the model and workspace. With an approved spreadsheet attached, request a specific calculation and inspect the code when Python is used. Review against known totals. An exported file is not proof that every workbook feature was preserved; check the result in Excel before using it. Consult the official sources linked below for current capabilities.

Example prompt
[Where file analysis is available, attach an approved test workbook.] Keep the source unchanged. Calculate revenue by category and show the code and control totals. Flag repeated Order IDs in a separate review table; do not delete them because they may represent separate line items. List ambiguous dates and missing values without guessing. Export proposed changes separately only after I approve the rules.

Common Mistakes That Waste Your Time

1. Not telling ChatGPT your Excel version

Check each function against your version. XLOOKUP is unavailable in both Excel 2016 and Excel 2019. Request a compatible alternative and test it with known inputs; a version label in the prompt is not a guarantee.

2. Applying formulas to your real data before testing

ChatGPT formulas are usually correct but occasionally get parameter order wrong or mishandle edge cases like blanks and zeros. Always test in a scratch cell on a few sample rows before dragging the formula down your entire dataset. The 2 minutes of testing prevents hours of cleanup.

3. Asking for a named formula instead of describing the result

'Write me a VLOOKUP' gets you a generic VLOOKUP template. 'Find the commission rate for a customer based on their tier stored in a lookup table on Sheet2' gets you the right function (probably XLOOKUP or INDEX/MATCH) with the correct arguments for your actual layout. Describe outcomes, not function names.

4. Running VBA macros on your original file

Treat generated VBA as unreviewed code. Inspect destructive changes, file access, network calls, and email actions. Follow your organization's macro policy and test on a copy; do not bypass security controls for unfamiliar code.

5. Pasting confidential data into ChatGPT

Use synthetic examples where possible. Real customer, personnel, or commercial data requires approval for the actual service and account. Review retention and data controls separately from code execution; sandboxing is not permission to upload restricted information.

6. Expecting ChatGPT to handle undescribed sheet structure

Named ranges, table names (Excel Tables vs plain ranges), hidden sheets, and merged cells are invisible to ChatGPT. If your formula relies on any of these, describe them explicitly. 'My data is formatted as an Excel Table named SalesData' will produce different (and more accurate) formulas than assuming ChatGPT knows your sheet structure.

7. Asking for everything in one giant prompt

Multi-part Excel problems work better as a conversation. Build the core formula first, confirm it works, then ask for error handling, then ask for the VBA wrapper to automate it. Chunking produces more accurate output and makes debugging any single step far easier.

Pro Tips (What Most Excel Users Miss)

Ask ChatGPT to explain the formula, not just give it to you. Add 'explain each argument' to your prompt. Understanding the logic means you can modify it yourself instead of returning to ChatGPT every time a detail changes.

Ask for alternatives for the versions your colleagues use. Then test both. A generated compatibility claim needs the same scrutiny as the formula itself.

For VBA macros, ask for the error-handling version. Beginner VBA crashes without explanation. Ask ChatGPT to 'add On Error GoTo handling with a user-friendly error message.' This makes macros shared with non-technical colleagues far more robust.

Describe your current manual process before asking for automation. 'I currently do this: [steps]' gives ChatGPT the context to write logic that handles your actual workflow, not a textbook version of the task.

For SUMIFS with multiple OR conditions, ask ChatGPT to explain the workaround. SUMIFS uses AND logic natively; OR requires either SUMPRODUCT or multiple SUMIFS added together. ChatGPT will show you both approaches and explain the trade-offs.

When debugging, paste the formula as plain text, not a screenshot. ChatGPT reads formula text; screenshots require extra processing and may not capture the full formula if it's long.

Use ChatGPT to convert Excel formulas to Google Sheets equivalents. If you share spreadsheets between platforms, ask: 'Convert this Excel formula to Google Sheets syntax' and it will handle the function differences and ARRAYFORMULA requirements automatically.

ChatGPT Excel Prompt Library (Copy-Paste)

Example prompts organized by task. Replace the variables and test the results; these are not a claim of production validation.

Formula generation

'I am on [Excel version]. Column A = [field], B = [field], C = [field]. Row 1 is headers. Write a formula for cell D2 that [describe the calculation]. Handle blank cells and show 0 instead of an error.'
'Write two versions of a formula that looks up [value] in [lookup range] and returns [return column]: one using XLOOKUP (Excel 365) and one using INDEX/MATCH (backward compatible). Explain the difference.'

VBA macros

'Write a VBA macro that loops through all rows with data in column A and [describe action]. Skip blank rows. Add On Error GoTo error handling with a message box. Include comments explaining each section.'
'Write a VBA macro that exports a filtered version of Sheet1 to a new workbook. Filter criteria: [condition]. Save the new file as [filename pattern] in the same folder as the original. Don't modify the original.'

Data cleaning

'Column A has names in all-caps with inconsistent spacing (e.g., JOHN SMITH). Write an Excel 365 formula for B2 that returns the name in title case with no extra spaces.'
'Column B has phone numbers in three formats: (555) 123-4567, 555-123-4567, and 5551234567. Write a formula for C2 that standardizes all to XXX-XXX-XXXX format.'
'Identify and flag duplicate values in column A. Write a COUNTIF formula for column B that shows Duplicate if a value in A appears more than once, and Unique otherwise.'

Conditional aggregation

'Write a SUMIFS formula that totals [column] only where [column] equals [value] AND [column] is between [date1] and [date2]. Use cell references for the dates so they can be changed without editing the formula.'
'I need to count rows where [column A] contains any value starting with SaaS AND [column B] is greater than 1000. Write the COUNTIFS formula, noting that COUNTIFS uses AND logic so wildcards apply.'

Debugging

'This formula returns [error or wrong result]: [paste formula]. The data in [columns]: [paste sample rows]. Expected result for row 2 should be [expected value]. What is wrong and what is the corrected formula?'
'My VLOOKUP is returning N/A even though I can see the lookup value in the table. Formula: [paste]. Lookup table is on [Sheet2, column A]. What are the most common causes of this specific VLOOKUP error?'

Report automation

'I have raw data on Sheet1 with columns: [list]. I want Sheet2 to automatically show [describe summary metrics]. Design the formula architecture for Sheet2 that updates when Sheet1 data changes. Start with [first metric].'
'Write a formula that calculates month-over-month percentage change where: this month total is in [cell] and prior month is in [cell]. Show the result as a percentage with a + or - prefix, and show N/A if either cell is blank or zero.'

Advanced Data Analysis (file upload)

[Where file analysis is available, attach an approved workbook.] This file has [describe sheets and columns]. Preserve the original. Perform [analysis task] and show the calculation code. Propose cleaning rules and exceptions before exporting a separate output; do not silently delete records or guess ambiguous values.

Want more ChatGPT prompts by use case? See the ChatGPT prompts hub, ChatGPT custom instructions templates, and our guide on how to use ChatGPT for data analysis for related workflows.

Frequently Asked Questions

Related Guides

Don't stop here

What to read next

Hand-picked guides our readers explore right after this one.