SAT, OCTOBER 31, 2026
Independent · In‑Depth · Practitioner‑Tested
ChatGPT Productivity

AI Spreadsheet and Excel Automation Prompts

A formula that looks right and is wrong costs more than no formula at all. Every prompt here asks the model to state its assumptions and name the edge cases before producing anything you would paste into a sheet. They cover formulas, Power Query, VBA, cleanup and the audit work that catches errors someone else introduced.

⌨️ 10 prompts 🕐 Updated Oct 31, 2026 👁 5 views
💡 How to use these prompts: Replace everything in [BRACKETS] with your specific details before sending. Click Copy to copy any prompt to your clipboard instantly.
1
Write a formula that survives edge cases
Any new formula
Write an Excel formula for this.\n\nWhat I need: [DESCRIBE]\nData layout: [DESCRIBE COLUMNS AND WHERE THE DATA STARTS]\nExcel version: [365, 2021, 2019, OR GOOGLE SHEETS]\n\nBefore writing it, state:\n1. Your assumptions about the data.\n2. What happens with blanks, text in a number column, duplicates, and zero matches.\n\nThen give the formula, an explanation of each part, and a version that handles the error cases. If my Excel version lacks a function you would normally use, say so and give the alternative.
2
Explain a formula someone else wrote
Inheriting a spreadsheet
Explain this formula.\n\nFormula: [PASTE]\nContext: [WHAT THE SHEET DOES]\n\n1. Break it into its nested parts and explain each from the inside out.\n2. State in one sentence what it returns.\n3. List the assumptions it makes about the data.\n4. Name every way it can break or return a wrong answer silently.\n5. Suggest a simpler version if one exists, and say what is lost.\n\nIf the formula is already fine, say so rather than inventing improvements.
3
Clean a messy dataset
Importing data from elsewhere
I have a dataset with inconsistent formatting.\n\nSample rows: [PASTE 15 TO 20 ROWS INCLUDING THE BAD ONES]\nWhat clean looks like: [DESCRIBE]\n\n1. List every distinct problem you can see in the sample, with an example of each.\n2. For each, give the fix as a formula, a Power Query step, or a Find and Replace, whichever is most reliable.\n3. Put them in the order they must run, and say why the order matters.\n4. Name the problems that cannot be fixed automatically and need a human decision.\n\nNever silently drop rows.
4
Build a Power Query transformation
Repeatable data imports
Build a Power Query transformation.\n\nSource: [DESCRIBE THE FILE OR CONNECTION]\nCurrent shape: [PASTE SAMPLE]\nTarget shape: [DESCRIBE]\nRefresh frequency: [HOW OFTEN]\n\nGive the steps in order with the M code for each, and explain what each step does to the data.\n\nThen answer: what happens on refresh if a column is renamed at source, if a new column appears, or if the file is empty? Make the query fail loudly rather than produce wrong output.
5
Write a VBA macro with error handling
Automating a repeated task
Write a VBA macro.\n\nTask: [DESCRIBE]\nWorkbook structure: [DESCRIBE SHEETS AND RANGES]\nRuns: [HOW OFTEN, AND BY WHOM]\n\nRequirements:\n- Error handling that reports what failed and where\n- No Select or Activate\n- Screen updating off during the run and restored after, including on error\n- A confirmation prompt before anything is deleted or overwritten\n- Comments explaining the why, not the what\n\nThen list what could go wrong when someone else runs it on a slightly different workbook.
6
Audit a spreadsheet for errors
Checking a model before it is trusted
Audit this spreadsheet for mistakes.\n\nStructure: [DESCRIBE SHEETS]\nFormulas: [PASTE THE KEY ONES WITH CELL REFERENCES]\nWhat it is used for: [DESCRIBE]\n\nLook for: ranges that do not extend to the last row, absolute and relative references that break when copied, hardcoded numbers inside formulas, inconsistent formulas within a column, circular logic, and anything that returns a plausible wrong number rather than an error.\n\nRank findings by how much the output would be wrong, not by how obvious they are. Quantify the error where you can.
7
Design a sheet structure before entering data
Starting a new workbook
Help me design a spreadsheet before I start building it.\n\nPurpose: [DESCRIBE]\nWho uses it: [DESCRIBE]\nWhat it must output: [DESCRIBE]\nExpected size: [ROWS AND GROWTH]\n\nGive:\n1. The sheets needed and what each holds.\n2. The columns for each, with data types and validation rules.\n3. Where raw data ends and calculation begins - they should not share a sheet.\n4. What should be a table rather than a range, and why.\n5. The three ways this design will most likely be misused, and how to prevent each.
8
Convert a report into a pivot-ready table
Making exported reports usable
This data is formatted as a report and I need it as a flat table.\n\nCurrent layout: [PASTE SAMPLE INCLUDING MERGED CELLS AND HEADERS]\n\n1. Describe exactly what is wrong with it for analysis purposes.\n2. Give the target flat structure, one row per observation.\n3. Give the steps to transform it, preferring Power Query over manual work.\n4. Say what information is lost in the conversion, if any.\n\nWatch for repeated headers inside the data, subtotal rows mixed with detail rows, and values stored in column names.
9
Write a formula to reconcile two lists
Matching records between systems
I need to reconcile two lists that should match and do not.\n\nList A: [DESCRIBE COLUMNS AND SAMPLE]\nList B: [DESCRIBE COLUMNS AND SAMPLE]\nWhat counts as a match: [DESCRIBE THE KEY]\n\nGive formulas that produce four outputs: in A only, in B only, in both and matching, in both but differing.\n\nHandle the usual causes of false mismatches: trailing spaces, case differences, numbers stored as text, and date formats. Say which of these you are handling and which need checking first.
10
Explain what a spreadsheet actually does
Taking over someone elses model
I inherited this workbook and need to understand it.\n\nSheets: [LIST THEM]\nKey formulas: [PASTE]\nKnown purpose: [WHATEVER I WAS TOLD]\n\nProduce:\n1. A plain explanation of what the workbook calculates, in order.\n2. A map of which sheets feed which.\n3. The inputs someone is expected to change, and the cells that should never be touched.\n4. Anything that looks like a leftover, a workaround or a mistake.\n\nFlag clearly where you are inferring intent rather than reading it from the formulas.