AI & Technology

ChatGPT for Excel: How to Use AI to Master Spreadsheets

Learn how to use ChatGPT to write Excel formulas, create macros, analyse data, and solve spreadsheet problems. Practical examples and prompts included.

JG
Jon Goodey
Founder & CEO
15 January 2026 11 min read

Excel is powerful but often frustrating. Complex formulas, mysterious error messages, and VBA macros can stop even experienced users in their tracks. ChatGPT changes this equation - it can write formulas, explain errors, create macros, and teach you Excel concepts in plain English.

This guide shows you exactly how to use ChatGPT to work more effectively with Excel. Whether you’re struggling with VLOOKUP or building automated reports, ChatGPT can help.

What ChatGPT Can Do for Excel Users

ChatGPT excels (no pun intended) at several Excel-related tasks:

  • Write formulas based on plain-English descriptions
  • Explain existing formulas that you don’t understand
  • Debug errors and fix broken formulas
  • Create VBA macros for automation
  • Suggest approaches for data analysis
  • Generate sample data for testing
  • Convert formulas between Excel and Google Sheets

What ChatGPT Cannot Do

Understanding limitations prevents frustration:

  • Cannot see your actual spreadsheet - you must describe your data
  • Cannot directly edit Excel files - it provides text you copy-paste
  • May not know the latest Excel features - knowledge has cutoff dates
  • Sometimes makes mistakes - always verify formulas work as expected

Writing Excel Formulas With ChatGPT

Basic Formula Requests

The most common use: describing what you need and getting a formula back.

Example prompt: “I have employee names in column A and their sales figures in column B. I want to find the total sales for employees whose names contain ‘Smith’.”

ChatGPT response:

=SUMIF(A:A,"*Smith*",B:B)

The formula uses wildcards (*) to match any name containing “Smith” and sums the corresponding values from column B.

Complex Formula Building

ChatGPT handles multi-condition logic well.

Example prompt: “I have dates in column A, product categories in column B, and sales amounts in column C. I need a formula that sums sales for ‘Electronics’ in January 2026.”

ChatGPT response:

=SUMIFS(C:C,B:B,"Electronics",A:A,">=2026-01-01",A:A,"<=2026-01-31")

For even more complex scenarios, describe your requirements step by step. ChatGPT can chain multiple functions together.

Tips for Better Formula Prompts

  1. Describe your data structure - which columns contain what
  2. Give example values - “Column A has dates like 15/01/2026”
  3. Specify the output location - where you’ll enter the formula
  4. Mention any constraints - “The formula needs to work with blanks”
  5. State your Excel version if using older software - some functions aren’t available in all versions

Understanding Existing Formulas

Found a complex formula you don’t understand? ChatGPT can explain it.

Example prompt: “Explain what this formula does: =INDEX(B:B,MATCH(MAX(IF(A:A=“Sales”,C:C)),IF(A:A=“Sales”,C:C),0))”

ChatGPT explanation: “This formula finds the value in column B that corresponds to the highest value in column C, but only for rows where column A equals ‘Sales’.

Breaking it down:

  1. IF(A:A=“Sales”,C:C) creates an array of values from column C only where column A is ‘Sales’
  2. MAX(…) finds the highest value in that filtered array
  3. MATCH(…,0) finds the position of that maximum value
  4. INDEX(B:B,…) returns the value from column B at that position

This is essentially finding: ‘What’s in column B for the row with the highest sales value?’”

This explanation helps you understand, modify, and troubleshoot the formula.

Fixing Excel Errors

When formulas break, ChatGPT can diagnose the problem.

Common Errors and How to Get Help

#VALUE! Error

Prompt: “My formula =A1+B1 gives #VALUE! error. Column A has numbers like 100, column B has numbers like 50.”

ChatGPT will ask clarifying questions or suggest the likely cause - often cells contain text that looks like numbers, or hidden characters.

#REF! Error

Prompt: “I moved my data and now my formula shows #REF!”

ChatGPT explains that #REF! means referenced cells have been deleted or moved, and suggests how to update references.

Circular Reference Warnings

Prompt: “Excel says I have a circular reference in my formula =SUM(A:A) in cell A10.”

ChatGPT explains that A:A includes A10 itself, creating an infinite loop, and suggests limiting the range to =SUM(A1:A9).

Debugging Approach

When formulas don’t work as expected:

  1. Tell ChatGPT the formula
  2. Describe what it’s doing (wrong output)
  3. Describe what you expected
  4. Provide sample data values

ChatGPT can trace through the logic and identify where it goes wrong.

Creating VBA Macros

VBA (Visual Basic for Applications) automates repetitive Excel tasks. ChatGPT writes VBA code from plain descriptions.

Simple Macro Example

Prompt: “Write a VBA macro that copies data from Sheet1 to Sheet2, but only rows where column A contains ‘Complete’.”

ChatGPT response:

Sub CopyCompleteRows()
    Dim wsSource As Worksheet, wsDest As Worksheet
    Dim lastRow As Long, destRow As Long, i As Long

    Set wsSource = ThisWorkbook.Sheets("Sheet1")
    Set wsDest = ThisWorkbook.Sheets("Sheet2")

    lastRow = wsSource.Cells(wsSource.Rows.Count, "A").End(xlUp).Row
    destRow = 1

    For i = 1 To lastRow
        If wsSource.Cells(i, 1).Value = "Complete" Then
            wsSource.Rows(i).Copy Destination:=wsDest.Rows(destRow)
            destRow = destRow + 1
        End If
    Next i

    MsgBox "Copy complete! " & (destRow - 1) & " rows copied."
End Sub

ChatGPT also explains how to add the macro to Excel (Alt+F11, insert module, paste code, run).

Automated Reports

Prompt: “I need a macro that creates a summary table from my data. Column A has department names (Sales, Marketing, Finance - with repeats), column B has monthly figures. I want a table showing each department once with their total.”

ChatGPT can create macros that:

  • Find unique values
  • Calculate totals for each
  • Format output as a proper table
  • Add headers and formatting

Macro Safety Notes

ChatGPT includes important reminders:

  • Save your workbook before running new macros
  • Test on a copy of your data first
  • Macros can’t be undone with Ctrl+Z
  • Enable macros only from trusted sources

Data Analysis With ChatGPT

ChatGPT helps plan your analysis approach, not just write formulas.

Choosing the Right Analysis

Prompt: “I have sales data with dates, products, regions, and revenue. I want to understand which regions are performing best and whether there are seasonal patterns. What analysis should I do in Excel?”

ChatGPT suggests:

  1. Pivot tables to summarise by region
  2. Time-series charts to visualise trends
  3. Year-over-year comparison formulas
  4. Variance analysis between regions
  5. Moving averages to smooth seasonal noise

It then explains how to create each analysis in Excel.

Pivot Table Guidance

Prompt: “How do I create a pivot table showing total sales by region and product category, with months as columns?”

ChatGPT provides step-by-step instructions:

  1. Select your data range
  2. Insert > PivotTable
  3. Drag Region to Rows
  4. Drag Product Category to Rows (below Region)
  5. Drag Date to Columns, group by Month
  6. Drag Sales to Values

Plus formatting tips and how to handle common pivot table issues.

Practical ChatGPT Prompts for Excel

Here are ready-to-use prompts for common scenarios:

Lookup Formulas

“Write an Excel formula to look up a product name in column A and return the price from column B. The data is in Sheet1 and my lookup value is in cell D1.”

Conditional Formatting Rules

“How do I highlight cells in column B that are more than 20% higher than the average of column B?”

Date Calculations

“I have start dates in column A and end dates in column B. Write a formula for column C that calculates working days between them, excluding weekends.”

Text Manipulation

“Column A has full names like ‘John Smith’. Write formulas to extract first name to column B and last name to column C.”

Dynamic Ranges

“My data grows each week. How do I create a chart that automatically includes new data without manually updating the range?”

Data Validation

“How do I create a dropdown list in column B that only shows options relevant to what’s selected in column A?”

Microsoft Copilot vs ChatGPT for Excel

Microsoft has integrated AI directly into Excel through Copilot. How does it compare?

Microsoft Copilot Advantages

  • Direct integration: Works inside Excel, no copy-pasting
  • Sees your data: Understands your actual spreadsheet
  • Creates visualisations: Generates charts automatically
  • Natural language: Ask questions about your data directly

ChatGPT Advantages

  • Free tier available: Copilot requires Microsoft 365 subscription
  • More detailed explanations: Better for learning
  • No data privacy concerns: Your spreadsheet data isn’t sent anywhere
  • Works with any version: Not limited to Microsoft 365

When to Use Each

Use Copilot when:

  • You have a Microsoft 365 subscription
  • Working with large, complex datasets
  • Need quick answers about specific data
  • Want direct spreadsheet manipulation

Use ChatGPT when:

  • Learning Excel concepts
  • Needing detailed explanations
  • Working with sensitive data
  • Creating templates for repeated use
  • Using older Excel versions

Common Mistakes When Using ChatGPT for Excel

Mistake 1: Vague Prompts

Weak: “I need a formula to sum things”

Better: “I need a formula to sum values in column C where column A contains ‘Sales’ and column B is greater than 100”

Mistake 2: Not Verifying Results

ChatGPT sometimes generates formulas with errors or uses functions incorrectly. Always test on sample data before applying to important spreadsheets.

Mistake 3: Ignoring Excel Version

Some functions (like XLOOKUP, FILTER, UNIQUE) only work in newer Excel versions. Specify your version when formulas don’t work.

Mistake 4: Not Describing Data Types

“My dates don’t work” - ChatGPT needs to know whether dates are stored as dates, text, or numbers to diagnose problems.

Mistake 5: Expecting Real-Time Interaction

ChatGPT can’t see when things change. If you modify your spreadsheet, describe the new situation rather than saying “now it’s different.”

Frequently Asked Questions

Can ChatGPT directly edit my Excel files?

No. ChatGPT generates text (formulas, code, explanations) that you copy into Excel. It cannot access, view, or modify files on your computer.

Is it safe to share my spreadsheet data with ChatGPT?

Consider what data you’re sharing. Don’t paste sensitive business data, personal information, or confidential figures. Describe data patterns without specific values when possible. For truly sensitive work, use generalised examples.

Why do ChatGPT’s formulas sometimes have errors?

ChatGPT makes mistakes, especially with complex logic or regional settings (date formats, list separators). It also may not know about very recent Excel features. Always verify formulas work correctly.

Can ChatGPT write Google Sheets formulas too?

Yes. Specify “Google Sheets” in your prompt. Some functions differ (GOOGLEFINANCE, IMPORTRANGE, etc.) and ChatGPT can adapt accordingly or convert between platforms.

How do I use ChatGPT for Excel on mobile?

ChatGPT works through web browsers and apps on mobile devices. You can ask questions and receive formulas, though typing complex prompts and copying results is easier on desktop.

Is ChatGPT better than Excel’s built-in help?

For specific formula writing and debugging, often yes. ChatGPT provides contextual answers to your exact situation rather than generic documentation. For learning comprehensive features, Microsoft’s documentation and courses may be better structured.

Getting Started

If you’re new to using ChatGPT for Excel:

  1. Start simple: Ask for basic formulas you already know how to write. Compare results to verify accuracy.

  2. Build complexity gradually: Once confident with simple requests, try multi-condition formulas and VBA macros.

  3. Learn from explanations: Don’t just copy formulas - read ChatGPT’s explanations to understand why they work.

  4. Save useful responses: Keep a document of formulas and macros that work well for your common tasks.

  5. Iterate when needed: If the first response isn’t quite right, clarify what’s wrong and ask for adjustments.

ChatGPT won’t replace learning Excel fundamentals, but it dramatically accelerates solving specific problems. Use it as a knowledgeable colleague who can help you past roadblocks.

For more AI productivity tools, explore our QuillBot UK Review for writing assistance. To understand AI-powered development tools, see our Cursor AI Complete Guide.


About Indexify: We provide data-driven marketing intelligence for UK businesses. No fluff, no vanity metrics - just growth.

JG

Jon Goodey

Founder & CEO

Jon is the founder of Indexify, helping UK businesses leverage AI and data-driven strategies for marketing success. With expertise in SEO, digital PR, and AI automation, he's passionate about sharing insights that drive real results.

Related Resources

Continue Reading

Our Services

Ready to Put These Insights Into Action?

Explore our services or get in touch to discuss your marketing goals.