Store › Blog › Guides

How do you clean messy data in Excel with help from Claude?

By IA Business Lab · Updated 2026-11-21

Copy only the headers and 5 to 10 sample rows (with no confidential data), explain the problem and the result you expect, and ask Claude for the formula or procedure. Always test it on a copy of the file and check the result on several rows before applying it to the whole dataset.

Which cleaning problems it handles best

  • Extra spaces and invisible characters (TRIM and CLEAN functions).
  • Inconsistent capitalization (PROPER, UPPER, LOWER).
  • Dates stored as text (DATEVALUE or Text to Columns).
  • Numbers stored as text (VALUE).
  • Duplicate names written in different ways.
  • Data combined in one cell that needs splitting.

The step-by-step method

  1. Make a copy of the file and work on the copy.
  2. Replace or remove sensitive data before pasting anything into an AI assistant.
  3. Describe the problem with a real example: "In column B I have dates like '03/11/2026 ' with a trailing space, and Excel treats them as text".
  4. State your Excel version and what you want to get.
  5. Ask for the formula and a short explanation of how it works.
  6. Try it in a helper column (do not overwrite the original).
  7. Check at least 10 rows by hand, including the odd ones.
  8. Once validated, convert the results to values and delete the helper column.

Example prompt

I have a column A with customer names like " juan PÉREZ " and "Maria lópez". I want them to read "Juan Pérez" and "Maria López", with no extra spaces. I use Excel 365. Give me the formula for cell B2 and explain what each function does.

A reasonable answer would use a combination like =PROPER(TRIM(A2)), which removes extra spaces and capitalizes the first letter of each word. Always check special cases: surnames with prefixes or acronyms may need manual fixes.

Common mistakes

  • Pasting confidential data (clients, salaries) into an external tool.
  • Applying the formula to the original data without a copy.
  • Trusting the result without checking odd cases.
  • Asking to "clean everything" without saying what clean means for your case.

When another tool is better

If you need to repeat the cleaning every month on large datasets, Excel's Power Query lets you save the steps and rerun them. Claude can help you design those steps or write a macro, but the result still needs testing.

Frequently asked questions

Can Claude clean the file directly?

It depends on how and where you use it. The safest approach is to ask for formulas or steps and apply them yourself, checking the result.

Do I need advanced formula skills?

No: describe the problem in plain language and ask for an explanation of the formula it proposes.

How do I avoid errors?

Work on a copy, test on a few rows and compare against the original.

Does it work for large datasets?

It helps design the method, but for large or recurring datasets Power Query is usually a better fit.

Sources and further reading

  • Microsoft Support: Excel TRIM, CLEAN, PROPER and VALUE functions.
  • Microsoft Support: Power Query in Excel.

Go deeper with the book

Claude with Excel: Practical Cases — English edition · Kindle eBook · sold on Amazon · $12.99 USD. Claude with Excel: Practical Cases teaches how to generate formulas, clean and transform data, build Pivot Tables, reports and VBA macros with Claude; it includes 10 business cases and 60 prompts, according to its official description. The example in this guide is illustrative and is not necessarily from the book.

Get the book on Amazon · $12.99 USDFull book page →

Educational content. Not professional advice. See the full store →