Skip to main content

Make Excel Formulas and VBA with Claude — No Add-in Needed

How to build Excel formulas and VBA macros in a plain claude.ai chat — no add-in required: conditional sums and lookup functions, automation code for repetitive tasks, finding error causes, and reading complex formulas. Always verify the formulas and code on your real data.

🌐 This article was machine-translated and may contain inaccuracies. Read the Korean original if in doubt.

When you can’t recall an Excel function or want to automate a repetitive task, you can describe what you want in plain words and Claude will produce a formula or VBA macro. This guide covers how to build and refine Excel formulas and VBA without any add-in, right in a regular claude.ai chat. (Formulas and code from Claude must be verified on your real data, and the result is your responsibility.)

🟢 Model references match the current lineup · model notice · Fable subscription
🟢 Model references match the current lineup · Claude Opus 5.5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.

Fable 5 and 5.1 subscription (updated September 7, 2026): Claude Fable 5.1, released September 1, 2026, is the current Fable model and Fable 5 is now legacy. Plan terms are the same for both — Max and Team Premium plans include Fable at up to 50% of the weekly usage limit; Pro and Team Standard use usage credits (

🟢 Model references match the current lineup · Claude Opus 5.5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.
0/M input, $50/M output tokens). The one-time
🟢 Model references match the current lineup · Claude Opus 5.5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.
00 credit applied only to the Fable 5 transition and is not offered for 5.1. Some coding and debugging requests may be answered by an Opus model due to a security classifier (both models). See the Fable 5.1 guide and the Fable 5 availability guide for details.

Three ways to use Claude with Excel Build formulas conditional sums, lookups, nesting VBA macros automate repetitive tasks Errors & explain find #REF! causes, read complex formulas Describe the task in words, get code — then verify it on your real data.

1. Building Excel formulas

The most common use is to describe the calculation you want and get the matching function — you don’t need to know the function name.

  • “Make a formula that sums column C where column A is a date in the current month and column B is ‘Done’.” → a conditional sum (e.g., SUMIFS)
  • “Give me a formula that pulls a price from another sheet by product code.” → a lookup function (e.g., VLOOKUP, INDEX/MATCH, XLOOKUP)
  • “Can you simplify this formula?” → cleaning up nested formulas

The key is to describe your data layout concretely: which column holds what, and example values. That gets you much closer to a formula you can use as-is.

2. Automating repetitive work with VBA macros

Tasks you repeat by hand can be automated with a VBA macro. Describe the task and Claude writes the code.

  • “Write a macro that merges data from several sheets into one.”
  • “I need a macro that deletes every row where a certain column is empty.”
  • “Give me code that combines the Excel files in this folder into one.”

To run the code, open the VBA editor in Excel with Alt+F11 and paste it into a module.

⚠️ Before running a macro: VBA changes files directly, so back up the original first, run it, and read through what the code does line by line. Don’t run macros from unknown sources.

3. Finding error causes and reading formulas

It’s also useful when an existing formula breaks, or you need to understand someone else’s complex formula.

  • “This formula throws a #REF! error — what’s the cause? [paste the formula]”
  • “Why do #VALUE! and #N/A errors usually happen?”
  • “Explain what this long formula does, step by step.”
Three Excel jobs for Claude① Build formulasDescribe the calculation→ get SUMIFS, XLOOKUPor the right function② Automate with VBAMerge sheets, deleteempty rows — repetitivework as macro code③ Explain errorsFind causes of #REF!,#VALUE!, #N/A and unpackcomplex formulasShare ranges, your Excel version, and a sample result for accuracy

Tips for better results

  • Be specific about the data layout: say things like “dates in B2:B100, amounts in column C.”
  • State your Excel version: functions like XLOOKUP and FILTER only work in Microsoft 365 / Excel 2021 or later. Mention an older version up front to get an alternative.
  • Give an example of the desired result: showing “this is what it should look like” improves accuracy.

Things to watch for

  • Verification is required: there’s no guarantee a formula or code is always correct. Run it on real data and check. Macros that change data are safest tested after a backup.
  • Adjust cell references: the ranges in a suggested formula may need to match your own sheet.
  • Version differences: some functions aren’t supported in older Excel.
  • Mind sensitive data: rather than pasting real confidential or personal data, describe the structure or use example values.

FAQ

Q. The formula doesn’t work.
Check the cell references, data layout, and Excel version. Pasting the exact error message back to Claude helps pin down the cause.

Q. Are VBA macros safe?
They’re safe if you review the code and back up the original file before running. If you don’t know what the code does, don’t run it.

Q. How is this different from the “Claude in Excel” add-in?
The add-in has Claude work directly inside the Excel app; this method has you get code and formulas in the free chat and paste them in yourself. To work right inside Excel, see the Claude in Excel guide; for spreadsheet and slide automation, see the Claude in Excel & PowerPoint guide.

Was this helpful?

Keep reading