AI Prompt Generator for Excel

Generate ready-to-use prompts for Excel and Google Sheets with ChatGPT, Claude or Gemini.

Generate a Prompt for Your Excel Task

Uses modern functions (XLOOKUP, LET). Checks assumptions before calculating.
Preserves your workbook structure. Delivers formula immediately with IFERROR handling.
Optimised for Google Sheets native functions. Verifies syntax and parentheses.
Your prompt — ready to copy into ChatGPT
Need a ready-made prompt instead? Browse the templates below.

Ready-to-Copy Excel & Google Sheets Prompts

Replace everything in [SQUARE BRACKETS] with your own details, then paste into ChatGPT, Claude or Gemini.

Formulas & Functions 5 prompts
Write a SUMIFS formula View / Copy
I am using [EXCEL 365 / EXCEL 2019 / GOOGLE SHEETS]. I have a spreadsheet with the following columns: - Column A: [DESCRIBE COLUMN A, e.g. Date] - Column B: [DESCRIBE COLUMN B, e.g. Region] - Column C: [DESCRIBE COLUMN C, e.g. Product] - Column D: [DESCRIBE COLUMN D, e.g. Revenue] I want to sum the values in column D where [CONDITION 1, e.g. column B equals "North"] and [CONDITION 2, e.g. column C equals "Widget A"]. Write the SUMIFS formula and explain what each argument does.
Write an XLOOKUP formula View / Copy
I am using [EXCEL 365 / EXCEL 2019]. I want to look up [WHAT YOU ARE LOOKING FOR, e.g. an employee ID] in column [LOOKUP COLUMN, e.g. A] and return the corresponding value from column [RETURN COLUMN, e.g. C]. If no match is found, I want the formula to return [FALLBACK VALUE, e.g. "Not found" or 0]. Write the XLOOKUP formula and explain how it works.
Write a nested IF formula View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I need a formula that checks the value in cell [CELL REFERENCE, e.g. B2] and returns: - [RESULT 1, e.g. "High"] if the value is [CONDITION 1, e.g. greater than 1000] - [RESULT 2, e.g. "Medium"] if the value is [CONDITION 2, e.g. between 500 and 1000] - [RESULT 3, e.g. "Low"] if the value is [CONDITION 3, e.g. less than 500] Write the formula. If there is a cleaner alternative to nested IFs for this situation (such as IFS), show me that version too.
Explain a formula I inherited View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. Here is a formula from a spreadsheet I inherited: [PASTE YOUR FORMULA HERE] Please explain what this formula does, breaking it down layer by layer from the innermost function outward. Explain what each argument controls and flag anything that looks fragile or likely to break if the data changes.
Write a COUNTIFS formula View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I want to count rows in my spreadsheet where: - [COLUMN, e.g. Column B] equals [VALUE, e.g. "Completed"] - [COLUMN, e.g. Column C] is greater than [VALUE, e.g. a date or number] My data runs from row 2 to row [LAST ROW, e.g. 500]. Write the COUNTIFS formula and explain each argument.
Data Cleaning 4 prompts
Remove duplicates and standardise a column View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I have a column of [DESCRIBE DATA, e.g. company names] in column [COLUMN LETTER]. The data has inconsistent formatting — some entries have extra spaces, inconsistent capitalisation, and slight spelling variations of the same value. Show me the best way to: 1. Standardise the formatting (trim spaces, fix capitalisation) 2. Identify and remove duplicate entries Use formulas where possible. If a manual step is needed, explain it clearly.
Split a column into multiple columns View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I have a column of data in column [COLUMN LETTER] that contains [DESCRIBE FORMAT, e.g. full names like "John Smith" or addresses like "123 Main St, Austin, TX 78701"]. I want to split this into separate columns for [DESCRIBE DESIRED OUTPUT, e.g. first name and last name, or street / city / state / zip]. Show me how to do this using formulas. If Text to Columns is a better option for my situation, explain that too.
Flag or remove blank rows View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I have a dataset from row 2 to row [LAST ROW] across columns [FIRST COLUMN] to [LAST COLUMN]. Some rows are completely blank or have only one or two cells filled. Show me how to: 1. Identify which rows are blank or near-blank using a formula 2. Filter or delete those rows efficiently I want to keep my original data intact until I confirm the deletions.
Convert text to numbers View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I have a column of numbers in column [COLUMN LETTER] that Excel is treating as text — they are left-aligned and formulas using them return errors or zero. Show me how to convert this column to proper numbers. Include at least two methods in case the first does not work for my data format.
Pivot Tables & Analysis 4 prompts
Set up a pivot table from scratch View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I have a dataset with these columns: [LIST YOUR COLUMNS, e.g. Date, Region, Salesperson, Product, Units Sold, Revenue]. I want to create a pivot table that shows [DESCRIBE WHAT YOU WANT TO ANALYSE, e.g. total revenue by region and product, broken down by month]. Walk me through how to set up this pivot table step by step, including which fields go in Rows, Columns, Values, and Filters.
Interpret pivot table results View / Copy
I have a pivot table showing [DESCRIBE WHAT THE PIVOT SHOWS, e.g. monthly revenue by region for Q1 2025]. Here are the key numbers from the pivot table: [PASTE OR DESCRIBE YOUR DATA, e.g. North: £120,000 / South: £85,000 / East: £210,000 / West: £60,000] Help me interpret these results. Identify the most significant patterns, flag any anomalies, and suggest two or three follow-up questions I should investigate next.
Add a calculated field to a pivot table View / Copy
I am using [EXCEL VERSION]. I have a pivot table that already shows [EXISTING FIELDS, e.g. Total Revenue and Total Units Sold]. I want to add a calculated field that shows [WHAT YOU WANT TO CALCULATE, e.g. Average Revenue per Unit, which is Revenue divided by Units Sold]. Show me how to add this calculated field to my existing pivot table.
Build an analysis using GETPIVOTDATA View / Copy
I am using [EXCEL VERSION]. I have a pivot table on sheet [SHEET NAME] that summarises [DESCRIBE DATA, e.g. monthly sales by product and region]. I want to pull specific values from this pivot table into a separate summary sheet using GETPIVOTDATA, so my summary updates automatically when the pivot refreshes. Show me how to write a GETPIVOTDATA formula to extract [SPECIFIC VALUE, e.g. total sales for "Widget A" in "North" for "January"].
Financial Models 4 prompts
Build a budget vs actual tracker View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I want to build a simple budget vs actual tracker for [CONTEXT, e.g. my small business monthly costs / a project budget / my department]. My cost categories are: [LIST CATEGORIES, e.g. Salaries, Software, Travel, Marketing, Office]. I need the tracker to show budget, actual spend, variance in £/$ and variance as a percentage, for each month across [TIME PERIOD, e.g. January to December 2025]. Design the structure of this tracker and give me the formulas for the variance columns.
Build a cash flow forecast template View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I want to build a 12-month cash flow forecast for [CONTEXT, e.g. a small business / a freelance practice / a project]. My main cash inflows are: [LIST INFLOWS, e.g. customer receipts, grant income]. My main cash outflows are: [LIST OUTFLOWS, e.g. salaries, rent, supplier payments, loan repayments]. Design the structure of this forecast template and give me the formulas for the opening balance, closing balance, and net cash flow rows.
Write variance commentary from a model View / Copy
I have the following budget vs actual figures for [PERIOD, e.g. Q1 2025]: [PASTE YOUR DATA, e.g. Revenue: Budget £500,000 / Actual £480,000 / Variance -£20,000 (-4%) Salaries: Budget £180,000 / Actual £195,000 / Variance +£15,000 (+8%) Marketing: Budget £40,000 / Actual £28,000 / Variance -£12,000 (-30%)] Known drivers behind these variances: [DESCRIBE KNOWN REASONS, e.g. revenue shortfall due to delayed contract / salary overspend due to early hire] Audience: [e.g. Finance Director / Board / Department Head / Myself] Write structured variance commentary. Keep it factual and concise. Do not invent reasons I have not provided.
Build a headcount cost model View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I want to build a headcount cost model that calculates total employment cost per person and in aggregate. For each person I have: [LIST DATA FIELDS, e.g. Name, Role, Start Date, Base Salary, Bonus %, Pension contribution %]. I want the model to calculate: - Total cost per person - Total cost by team or department - Monthly and annual cost totals Give me the structure and the key formulas.
VBA & Automation 4 prompts
Write a VBA macro to automate a repetitive task View / Copy
I am using [EXCEL VERSION]. I want a VBA macro that does the following: [DESCRIBE THE TASK STEP BY STEP, e.g. 1. Opens each file in a folder 2. Copies the data from sheet "Data" rows 2 onwards 3. Pastes it into the master workbook on sheet "Combined" starting at the next empty row 4. Closes each file without saving] Write the VBA code with comments explaining each section. I am not an experienced VBA user so keep the comments clear. Tell me where to paste the code and how to run it.
Write a macro to format and export a report View / Copy
I am using [EXCEL VERSION]. I want a VBA macro that: 1. Takes data from sheet [SHEET NAME] 2. Applies this formatting: [DESCRIBE FORMATTING, e.g. bold headers, alternating row colours, auto-fit columns] 3. Exports the result as a PDF saved to [FOLDER PATH OR DESKTOP] with the filename [FILENAME FORMAT, e.g. "Report_MonthYear.pdf"] Write the code with clear comments. Tell me if I need to adjust any file paths before running it.
Explain a VBA macro I inherited View / Copy
I am using [EXCEL VERSION]. Here is a VBA macro from a workbook I inherited: [PASTE YOUR VBA CODE HERE] Please explain what this macro does step by step. Flag anything that looks risky, fragile, or likely to cause errors if the data structure changes. Tell me if there are any hard-coded values I should be aware of.
Write a macro to send emails from Excel View / Copy
I am using [EXCEL VERSION] with [OUTLOOK VERSION]. I have a list in sheet [SHEET NAME] with the following columns: - Column A: Recipient email address - Column B: Recipient name - Column C: [DESCRIBE OTHER RELEVANT COLUMN, e.g. Invoice amount / Due date / Status] I want a VBA macro that loops through each row and sends a personalised email to each recipient using Outlook. The email subject should be [SUBJECT LINE] and the body should include the recipient's name and the value from column C. Write the code with comments. Tell me what references I need to enable in the VBA editor before running it.
Error Debugging 4 prompts
Debug a formula returning the wrong result View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. This formula is returning [WRONG RESULT, e.g. zero / a wrong number / TRUE when it should be FALSE] when I expect it to return [EXPECTED RESULT]: [PASTE YOUR FORMULA HERE] Here is what the relevant cells contain: - [CELL REFERENCE]: [VALUE] - [CELL REFERENCE]: [VALUE] Identify the most likely cause of the error and give me the corrected formula.
Fix a #REF! error View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I have a formula that is returning a #REF! error: [PASTE YOUR FORMULA HERE] The error appeared after I [DESCRIBE WHAT CHANGED, e.g. deleted a column / moved a sheet / copied the formula to a new range]. Explain why this #REF! error is occurring and give me the corrected formula.
Fix a #VALUE! or #N/A error View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I have this formula that is returning a [#VALUE! / #N/A] error: [PASTE YOUR FORMULA HERE] The data I am working with: [DESCRIBE YOUR DATA, e.g. the lookup column contains product codes stored as text but my lookup value is a number]. Diagnose the most likely cause and give me the corrected formula. If there are multiple possible causes, list them in order of likelihood.
Fix absolute and relative reference errors View / Copy
I am using [EXCEL VERSION / GOOGLE SHEETS]. I have this formula in cell [CELL REFERENCE, e.g. C2]: [PASTE YOUR FORMULA HERE] When I copy it down to the rows below / across to the columns to the right, it gives wrong results because [DESCRIBE THE PROBLEM, e.g. the reference to the lookup table is shifting when it should stay fixed / the row reference is not updating when it should]. Identify which references need $ signs to be fixed and which should remain relative. Give me the corrected formula.
Google Sheets Specific 4 prompts
Write a QUERY formula View / Copy
I am using Google Sheets. I have a dataset on sheet [SHEET NAME] in the range [RANGE, e.g. A1:F500] with these columns: - A: [COLUMN A DESCRIPTION] - B: [COLUMN B DESCRIPTION] - C: [COLUMN C DESCRIPTION] I want to use the QUERY function to [DESCRIBE WHAT YOU WANT, e.g. show only rows where column B equals "Completed" and column C is greater than 100, sorted by column C descending]. Write the QUERY formula and explain the SQL-like syntax so I can adapt it in future.
Write an IMPORTRANGE formula View / Copy
I am using Google Sheets. I want to pull data from another Google Sheet into my current sheet using IMPORTRANGE. The source sheet URL is: [PASTE URL OR DESCRIBE IT] The range I want to import is: [SHEET NAME AND RANGE, e.g. Sheet1!A1:D100] Write the IMPORTRANGE formula. Also tell me what I need to do the first time I use it (the permissions step) and how to combine it with a QUERY formula if I only want certain rows or columns.
Write an ARRAYFORMULA View / Copy
I am using Google Sheets. I have a formula in cell [CELL REFERENCE, e.g. C2] that I currently copy down manually through column C: [PASTE YOUR FORMULA HERE] I want to replace this with a single ARRAYFORMULA in C2 that automatically applies the calculation to all rows in the column without me having to copy it down. Write the ARRAYFORMULA version and explain any adjustments needed to make it work correctly across the full column.
Build an automated dashboard in Google Sheets View / Copy
I am using Google Sheets. I want to build a simple dashboard that pulls from a data sheet called [DATA SHEET NAME] and displays summary metrics on a separate dashboard sheet. The metrics I want to show are: [LIST METRICS, e.g. Total Revenue, Revenue by Region, Top 5 Products by Units Sold, Month-on-Month Growth %]. My data has these columns: [LIST COLUMNS]. Recommend the best combination of formulas (QUERY, SUMIF, SORT, LARGE, etc.) for each metric and explain how to structure the dashboard sheet so it updates automatically when the data sheet changes.

FAQ

Can AI write Excel formulas?
Yes. ChatGPT, Claude and Gemini can generate Excel formulas when you provide the column structure, the result you need and your Excel version. Always test the formula with real data before using it in a live workbook.
Does this work with ChatGPT, Claude and Gemini?
Yes. The builder supports ChatGPT, Claude and Gemini. Select the AI you want to use and the generated prompt will be adapted for that provider.
Can I use these prompts with Google Sheets?
Yes. Many spreadsheet tasks work in both Excel and Google Sheets. Select the spreadsheet app where available and specify any functions or features that are unique to your environment.
Can AI debug broken Excel formulas?
Yes. Include the broken formula, the error or unexpected result, and a few representative rows. The AI can help identify likely causes and suggest a corrected formula, which you should verify in Excel.
Can AI write VBA macros?
ChatGPT, Claude and Gemini can generate VBA code from a clear description of the task. Review and test generated macros in a copy of your workbook before using them on important data.
Does this work with Excel 2016 and 2019?
Yes, but you should specify your Excel version in the prompt. Newer functions such as XLOOKUP, FILTER and dynamic arrays are not available in every older Excel version.
Do I need a paid AI account to use these prompts?
No. You can use many of these prompts with free versions of ChatGPT, Claude or Gemini. File uploads, longer context and other advanced features may depend on the provider and plan you use.