So I want to ask you something. How many Excel files did you consolidate this month?
I will tell you my story.
Once I received a sales tax audit, and it forced me to redo my accounting on single line items. We are talking about thousands of lines spread over 80 CSV files. Cleaning them, combining them, making sure nothing was missing.
If I had done this manually in Excel, it would have taken me a full week. My accounting provider quoted me around $5,000 to handle it. And the deadline was not flexible.
So instead, I turned to AI and asked it to write me the code to consolidate all 80 CSVs (important note: I have never coded in my life). Then I even asked it to clean the data on top of the consolidation. After 3 iterations and about 20 minutes of back and forth, it worked perfectly.
I passed the audit. I did not miss my deadline. And I still use that same automation in every closing.
Since then, I have heard so many similar stories from finance pros who are still cleaning and combining Excel files by hand.
So today, I want to walk you through exactly how to do this, step by step, so that the next time you consolidate anything in Excel it takes you 30 seconds instead of 3 hours.
The Monthly Copy-Paste Tax
|
|
So, you’re looking at 20-something Excel files from regional managers or department heads sitting in your inbox. Each one has slightly different formatting. Some have extra columns. A couple are using the wrong template from last year.
And so you begin this process of opening a file, copying the data, pasting, checking if columns align, fixing the formatting, moving on to the next one. Then repeating that 22 more times.
The time is painful enough. But the real problem is what happens at scale.
With 5 files, you would catch a mistake. With 25 files, mistakes get missed (there’re more places for errors to hide).
You could miss a tab. Someone might have sent you the wrong version. A column shifted and your paste misaligned two months of data. You double-counted a department because the file name looked different but the data was the same.
So then you add verification time on top, and that 3-hour consolidation becomes a 4-hour consolidation-plus-audit.
And I always tell people in my training, if you are doing the same task every month with your mouse and your keyboard, and the steps are always the same, that is not a job for a human.
That is a job for a script.
Use Script as Your Saviour
In a previous newsletter, I talked about when you should not use AI, and we covered the different types of automation in detail. You can read it here.
In this newsletter we’re talking specifically about Excel consolidation (as it takes so much time)
|
|
With consolidation, the process is identical every month. You use the same files, structure, and output format. The data changes, but the steps do not.
And this is exactly what code (or script) was invented for. Doing the same thing perfectly every single time.
And now, you describe your consolidation process in plain English, and AI writes the script for you.
AI writes the VBA code or Office Script for Excel.
You paste it, you run it, and 30 seconds later you have your consolidated file.
And here is the part that I think is even more valuable than the consolidation itself.
You can ask AI to build verification directly into the script.
In my crash courses, I always tell people this: you can ask AI to add on top of the code a way for you to count the lines, and show you the totals.
Basically, having checkpoints to make sure that when the work is done, you don't have only the consolidated file…
You have a note of what happened. How many lines were in the original file? How many lines are in the last file? What is the total by tab? What is the total of the consolidated output?
So your output is not just one merged file. It is a merged file with a verification report that tells you exactly what happened: files processed, row counts per file, total rows in the output, any duplicates that were flagged, and any files that failed (with reasons).
You go from "I hope this is right" to "I can prove this is right." And that is a big deal when your manager or auditor asks how you got to these numbers.
How to Do This in 3 Steps
Step 1: Document your process before you touch any AI tool
Before you open your secure AI tool, write down exactly what you do manually. Open a note and describe it like you are explaining it to a new hire. Something like:
This matters more than you think. The better you describe your process, the better the script will be. It is also important to highlight what device you are using as different devices has different ways of interpreting scripts. Plus, you also have the documentation for others to understand the process.
I do this with my team. We have SOPs for everything repeatable.
Pro tip: You can also give AI your source files and your finished master file and ask it to reverse-engineer what you did. Either way, you end up with documentation you did not have to write from scratch.
Step 2: Ask AI to write the consolidation script.
|
|
Note – In Excel you have 2 options. If you use it on a desktop you can use VBA (Visual Basic), if you use Excel online, you can use Office Script. To learn more about the differences between the two you can go here (you can also use PowerQuery but it’s only focus on data import and transformation).
In your AI tool, paste your documentation from Step 1, and then add this prompt at the end:
And if you do not know where to put the code, just ask.
I always tell my cohorts this. If you do not know, just ask AI. Say:
It will walk you through it.
Step 3: Test with a small batch, let AI do the audit
|
|
Do not run the script on all 47 files the first time. Create a test folder with 3 to 5 sample files and run it there first.
But here is where most people lose time. They run the script, and then they go back to doing things manually like opening each source file, counting rows, checking columns, comparing totals by hand. That is the exact behaviour you were trying to escape.
Instead, go back to AI and ask it to build the audit into the script itself. Something like:
|
|
Now your output is not just the consolidated file. It is the consolidated file plus a summary that proves the input and the transformation equal the output.
Once it works, you have a script that runs perfectly every month. You just drop the files in the folder, run the script, and you are done.
And something I want you to remember about this: AI helps you build the automation. You do not go through AI every time. Because if you do, that is not an automation, it is just accelerated manual work.
The script works on its own. Next month, you do not need AI anymore because you have the code that works.
Pro tip: When encountering errors, copy the error details and ask AI:
It will help you edit or adjust the script based on the error.
The One Thing to Remember
Here is what I see happening with the people I train. Once they build two or three of these scripts for different recurring tasks, they start looking at everything differently.
Every time they find themselves doing the same steps with their mouse and keyboard, the first thought becomes: "Could I script this?" And the answer, more often than you would expect, is yes.
That is when you stop being the person who does the work and start being the person who builds the systems.
And the tools to do it are already on your computer.
Try it this week. Pick the one consolidation task that annoys you the most. Follow the three steps. And then tell me how it went.
Best,
Your AI Finance Expert,
Nicolas
P.S. – Did you try this? Hit reply and tell me how it went (I read all replies).
P.P.S. – The script I showed you today solves the consolidation. But what about the data preparation that happens before it? In this video I cover how AI Agents and Custom GPTs take on that entire layer too. Watch it here 3 Practical Ways to Use AI as a Finance Pro in 2026.
