Copy-ready prompt templates for formulas, data cleaning, pivot tables, VBA macros, and financial models. Use the prompt builder to generate a custom prompt in seconds, or browse the full library below.
Claude understands spreadsheet logic, formula syntax, and data structure better than most general AI tools. It can write formulas from a plain English description, explain what a complex nested function is doing layer by layer, debug errors from the formula bar, and write VBA macros with step-by-step comments.
This page gives you two things: a prompt builder that generates a custom prompt from your inputs, and a library of ready-to-copy prompts organised by task type — all tested with Claude on Excel 365, Excel 2019, and Google Sheets.
Prompt Builder
Fill in the fields below and click Build My Prompt. Copy the result directly into Claude.
Your prompt — ready to copy into Claude
Prompt Library
Browse prompts by category. Replace everything in [SQUARE BRACKETS] with your own details before pasting into Claude.
Formulas & Functions
5 prompts
Write a SUMIFS formula
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
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
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
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
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
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
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
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
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
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
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
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
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
I am using [EXCEL VERSION / GOOGLE SHEETS].
I want to build a simple budget vs actual tracker for [CONTEXT, e.g. my department's monthly operating costs / a project budget].
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
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 project / a department].
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
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 / marketing underspend due to campaign delay]
Audience: [e.g. Finance Director / Board / Department Head]
Write structured variance commentary suitable for a management pack. Keep it factual and concise. Do not invent reasons I have not provided.
Build a headcount cost model
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 employee I have: [LIST DATA FIELDS, e.g. Name, Role, Department, Start Date, Base Salary, Bonus %, Employer NI rate, Pension contribution %].
I want the model to calculate:
- Total employment cost per person (salary + bonus + NI + pension)
- Total cost by 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
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
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
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
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
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
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
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
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
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
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
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
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.
How to Get Better Results from Claude for Excel
Always tell Claude your Excel version
XLOOKUP and dynamic arrays require Excel 2019 or 365 — Claude will use compatible alternatives for older versions if you specify
Google Sheets has different syntax for several functions — always say "Google Sheets" if that is what you are using
LAMBDA functions are Excel 365 only — Claude will flag this if relevant
Describe your data structure before asking for a formula
Tell Claude which columns contain which data — "Column A is date, Column B is region, Column C is revenue"
Mention how many rows of data you have — it affects which approach Claude recommends
If data types matter (text vs number vs date), say so — type mismatches cause most formula errors
For debugging, paste the formula from the formula bar
Copy the formula directly from the formula bar, not from the cell display
Describe what result you are getting and what you expected
Mention any recent changes to the spreadsheet — deleted rows, moved sheets, copied formulas
For VBA macros, always test on a copy first
Never run a new macro on your live workbook — test on a copy first
Ask Claude to add comments to every section so you understand what the code does
If the macro needs to access files or folders, check file paths match your system before running
FAQ
Can Claude write Excel formulas?
Yes. Describe what you want the formula to do, which cells or columns are involved, and which version of Excel you are using. Claude writes the formula and explains how it works.
Does Claude work with Google Sheets?
Yes. Most Excel formulas work in Sheets with minor differences. Tell Claude you are using Google Sheets and it will adjust the syntax — for example using QUERY instead of Power Query, or ARRAYFORMULA where needed.
Can Claude debug broken formulas?
Yes. Paste the formula from your formula bar along with a description of what it should do and what error or wrong result you are getting. Claude identifies the most likely cause and gives you the corrected version.
Can Claude write VBA macros?
Yes. Describe what you want the macro to do step by step. Claude writes the VBA code with comments explaining each section. Always test macros on a copy of your file first.
Does this work with Excel 2016 and 2019?
Yes, with some limitations. XLOOKUP and dynamic arrays require Excel 2019 or 365. LAMBDA functions require Excel 365 only. Tell Claude which version you are using and it will use compatible functions.
Is Claude better than Microsoft Copilot for Excel?
They serve different purposes. Copilot works inside Excel directly. Claude is better for explaining complex logic, writing and debugging formulas in plain language, and building prompts you can reuse. Many professionals use both.
Do I need a paid Claude account to use these prompts?
No. Every prompt on this page works on the free tier of Claude. A paid plan gives higher usage limits but is not required.
Want to Go Deeper? Browse the Excel Mini-Courses
Each course takes 5 minutes and focuses on one specific Excel or Sheets workflow with Claude.