ChatGPT in Excel: Clean Data and Write Formulas Fast - PC Webinars blog post

ChatGPT in Excel: Clean Data and Write Formulas Fast

Every month, someone in one of my classes opens the same kind of file: a 4,000-row export with inconsistent capitalization, dates sitting in the sheet as text, and customer names in Last, First order. They clean it up by hand, it eats most of an afternoon, and next month the file arrives in exactly the same shape. That is the sort of work ChatGPT in Excel is genuinely good at — not running your business for you, but writing the formula you half-remember and working out the cleanup steps you do not want to puzzle through at 4:30 on a Friday.

The thing that trips most people up is simple: ChatGPT cannot see your workbook. It only knows what you paste into the chat window. Nearly every bad answer I have watched someone get came out of that one gap, and it is easy to close.

Here are the two uses worth learning first. Each one takes about ten minutes to try, and you do not need to attend anything to use them.

Use ChatGPT in Excel to write the formula you keep rebuilding

Do not ask it “how do I use SUMIFS.” Give it the shape of your data and describe the answer you want back. Copy your header row and three or four real rows out of the sheet, paste them into the chat, and then write the request like this:

Here is the header row and three sample rows from an Excel sheet. The data starts in cell A1 and the headers are in row 1. I need a formula for column H that totals Amount for every row where Region matches the region on that row and the Order Date falls in the same calendar month. Give me one formula I can put in H2 and fill down, and tell me which version of Excel it requires.

Two details in that prompt do the heavy lifting. Telling it where the data starts stops it guessing at column letters, which is the single most common reason a pasted formula comes back as #REF! or quietly totals the wrong column. Asking which version it needs stops the second most common failure, below.

What comes back is a working SUMIFS with EOMONTH handling the month boundaries, plus a plain-English explanation of each argument. The reason this beats doing it by hand is not the two minutes of typing it saves. It is that you end up with a formula that recalculates by itself next month, instead of a pivot table you rebuild and a total you re-check every time the file lands.

  • The gotcha: ChatGPT will cheerfully hand you TEXTSPLIT, TEXTBEFORE or GROUPBY, which only exist in Microsoft 365. On Excel 2019 or 2021 those return #NAME?. Add “I am on Excel 2021, use only functions available in that version” to the prompt and ask again.
  • Always test the formula on five rows you can check by eye before you fill it down 4,000.

Clean a messy export in one pass instead of twelve

The second job is the ugly monthly export, and the trick here is to have ChatGPT write Power Query code rather than describe steps for you to click through. Paste ten or twelve sample rows into the chat and ask for the M code directly:

Here are 12 sample rows from a CSV I load into Power Query. Write the M code for a query named Source that trims and proper-cases the Customer column, splits Name on the comma into Last and First, converts the Order Date text in dd/mm/yyyy format to a real date, and removes rows where Amount is blank. Return the whole let ... in block.

To use what it gives you: in Excel go to the Data tab, choose Get Data, then Launch Power Query Editor. On the Home tab open Advanced Editor, replace what is there with the code it wrote, and click Done, then Close and Load.

Here is why this one is worth the ten minutes. A find-and-replace fixes today’s file. A Power Query step fixes every file you ever load into it — next month you drop the new export in and click Refresh, and the trimming, splitting and date conversion all run again on their own.

  • The gotcha: M is case-sensitive and very fussy about column names. If your real header is “Order Date” with two spaces, the code fails with an unhelpful error. Paste your genuine headers, spelling and spacing included.
  • The bigger gotcha: do not paste real customer records, employee details, salary figures or anything covered by a client agreement into a consumer chatbot. Use a dozen anonymized rows, or your organization’s approved business account.

Plenty more on the calendar

If you would rather watch this done live, I am running ChatGPT for Excel on Thursday, December 10. We spend the whole session inside a real workbook: writing and correcting formulas with ChatGPT, cleaning up an ugly export, building summary tables, and — just as important — spotting the answers that look right and are not. You leave with the prompts themselves, not just the theory.

The full current schedule is on the front page of PCWebinars.com, with new dates going up as they are confirmed. Register for this one, or browse the others and pick whatever matches the software you are fighting with this month.

About your trainer

I’m Tom Fragale. I have been a computer trainer and consultant for more than 30 years, and I have taught well over 30,000 people how to get more out of the software they already own — Excel, Access, Power BI, Word, Outlook, and now the AI tools that sit on top of all of it: Claude, ChatGPT, and Microsoft Copilot. My background is applied, not theoretical. Alongside the teaching I build real databases and reporting systems for clients in Excel, Access, and Power BI, so the examples I use in class are the problems I ran into last week, not textbook exercises. I also publish free tutorials on YouTube and longer courses online.

If you want to see what else is coming up, the full schedule lives at PCWebinars.com.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *