How Do You Use Claude in Excel for Formulas, Power Query and VBA?
By IA Business Lab · Updated 2026-11-25 · ~587 words
To use Claude in Excel, describe your columns, give a sample row and the result you want, then test the formula, Power Query code or macro on known data before relying on it. This guide covers each tool.
How do you write a good Excel prompt?
Name your columns, show an example and state your Excel version. Example: "Column A has dates, B has amounts. Give me a formula that sums by month."
How do you generate complex formulas?
- Describe the logic in words.
- Ask for the formula and an alternative.
- Test on three rows you can check by hand.
How do you debug broken formulas?
Paste the formula and the error (#REF!, #N/A) and ask for the cause.
How do you clean and normalize data?
- Trim spaces and remove duplicates.
- Standardize dates and names.
- Split combined columns.
When do you use Power Query, VBA or Office Scripts?
| Tool | Best for |
|---|---|
| Power Query | Repeatable data cleaning |
| VBA | Desktop macros |
| Office Scripts | Excel on the web |
Claude can draft the M code or script; review and test it on a copy.
How do you forecast and build financial models?
Ask for a structure with assumptions in one place, then scenarios. Figures in examples are *illustrative*.
Worked example: sum by month (illustrative)
Data: column A dates, column B amounts. Prompt: "Give me a formula that sums column B for the month in cell E2. Excel in English, no helper columns." Test with three months you can add by hand before using it on the full sheet.
How do you ask for Power Query steps?
- Describe the source file and its problems.
- Ask for the steps in the Power Query editor, one at a time.
- Ask for the M code only after the steps work.
- Refresh with new data to confirm it is repeatable.
Prompt patterns that work
| Goal | Pattern |
|---|---|
| Formula | Columns + sample row + expected result |
| Debug | Formula + error text + what you intended |
| Clean | Describe issues + ask for steps |
| Macro | Task in words + "explain each line" |
Checklist before trusting a result
- [ ] Tested on rows I can verify.
- [ ] Totals match the source.
- [ ] Worked on a copy.
- [ ] Documented assumptions in a sheet.
Mistakes to avoid
- Pasting sensitive data.
- Running macros you do not understand.
- Skipping a backup before bulk changes.
A repeatable method for any spreadsheet task
| Step | What to do |
|---|---|
| 1. Describe | Share column names, three sample rows and the result you want |
| 2. Request | Ask for the formula, pivot setup or macro, plus an explanation |
| 3. Test | Run it on a copy and compare with values you can verify by hand |
| 4. Document | Save the prompt and result in a notes sheet |
Where AI helps most
- Cleaning messy text, dates and duplicates.
- Building summaries with pivot tables and charts.
- Writing lookup and conditional formulas for your Excel version.
- Combining files with Power Query.
- Explaining inherited spreadsheets line by line.
Avoiding silent errors
Check totals against the source, watch for numbers stored as text, confirm ranges include every row and keep inputs separate from calculations. Ask the assistant to list its assumptions.
Privacy
Remove or anonymize personal and financial data before sharing it with any tool, and follow your organization's rules.
Start today in 15 minutes
Take one spreadsheet you maintain and ask for a pivot table that answers a specific business question.
More questions
Do I need advanced Excel? No, but you need to test results. Is it always correct? No, verify every important figure.
FAQ
Frequently asked questions
Can I upload sensitive data?
Prefer anonymized or sample data.
Are the formulas always right?
No, always test.
What does the book cover?
Prompts, formulas, debugging, cleaning, Power Query, VBA, Office Scripts and models.
Keep learning
Go deeper with «Artificial Intelligence in Excel with Claude»
A comprehensive guide to combining Excel with Claude AI: formulas, data cleaning, Power Query, VBA, forecasting and financial models.
Get it on Amazon · 12.99 USDFull product page →
Educational content. Not professional advice; examples are illustrative and results are not guaranteed.