The Complete Excel Course with AI Integration
Excel macros and VBA for reconciliation analysts
Every morning the same exports need the same checks before a single item is matched: blank references, amounts that are not numbers, yesterday's flags still in the file. The Complete Excel Course with AI Integration turns that routine into VBA on the industry-standard FormatWizard project, and its whole section follows here in order: recorded macros and a button, the VBA editor, a last-row function, loops that flag and colour, and a master macro with an error handler.
Taught by Sagnik Bhattacharya and Virginia Thorn
What you will be able to do
At work, you will be able to:
- Record the formatting a fresh export needs as a macro, with absolute or relative references, and start it from a shortcut, the Developer tab or a button on the Quick Access Toolbar.
- Save a reconciliation workbook as .xlsm so its macros travel with it, and enable a file's content only when it is one you trust.
- Write a VBA function that returns the row where the data ends, so every loop covers today's export whether it holds more lines than yesterday's or none at all.
- Loop down the rows with For Next and If Else, writing a reason such as a missing reference or a missing value date into a Flag column, several reasons to a cell.
- Test an amount column with IsNumeric, so a word, an N/A or a stray character where a figure belongs is flagged and coloured before matching starts.
- Clear the last run's flags and fills at the start of each run, and fill each problem cell through Interior.Color, mixing the shade with RGB, so it stands out at a glance.
- Check what the code reads with Debug.Print in the Immediate window, then join every routine into one master macro with an error handler that reports what went wrong.
Projects
What you will build.
The course has 14 industry-standard projects. These two matter most here.
-
Project 11
FormatWizard
One click that checks a whole sheet for you.
Built on a sales sheet thousands of rows long, it becomes the pre-match review a reconciliation needs: the previous run's flags wiped, the end of the data found whatever the day's length, blank keys and non-numeric figures marked in words and colour, and a master macro that reports its own errors.
-
Project 13
AutoFlow
The weekly report routine, run by a flow instead of by you.
Built around a weekly sales report, it is automation from outside the workbook: Power Automate Desktop launches Excel, reads a worksheet, loops through its rows and writes results back. Its lessons need Windows; set beside FormatWizard, it gives you both ways of automating Excel work, from inside the file and from outside it.
Lessons
The lessons that matter, in course order.
The Complete Excel Course with AI Integration has 186 lessons. This page picks out 17 of them, 1 h 16 min of video. Each lesson keeps its number in the course.
Where to start
Lesson 136 Excel macros and VBA for beginners
Begin with Lesson 136 when Excel is familiar but recording a macro is not: FormatWizard grows from a first recording, and every later check builds on the routine before it. Already recording macros? Move quickly to Lesson 141, which opens the editor and starts the code, and if the editor is familiar too, the checks start at Lesson 146. Someone opening Excel for the first time starts with Lesson 1, and the COUNTIFS of Lesson 37 and the lookups from Lesson 67 are worth taking before the macro that will sit beside them.
17 of 186 lessons · 1 h 16 min
14 VBA and macros in Excel: FormatWizard The routine captured without code: what macros and VBA are, a first macro recorded with absolute references, a second with relative references that formats whichever row it starts from, the Developer tab and a Quick Access Toolbar button, and the .xlsm format that keeps them. The lessons format sales rows holding a negative amount, the kind of line a reconciliation knows as a reversal.
- 136 Start here Excel macros and VBA for beginners What macros are, the FormatWizard project 3 min
- 137 Record your first Excel macro Name, run and use absolute references 6 min
- 138 Relative references in Excel macros Make recorded macros dynamic 4 min
- 139 Developer Tab in Excel Run macros from a button and the quick access toolbar 4 min
- 140 Save macros in Excel Macro-enabled workbooks and the XLSM file format 3 min
14 VBA and macros in Excel: FormatWizard Into the code: the editor's Project Explorer and modules, the security bar and the trust choices behind it, a first line that points at a worksheet, variables declared under Option Explicit, a Sub set against a Function, and GetLastUsedRow, which any later macro can call to learn where the data truly ends.
- 141 The VBA Editor in Excel Open it with Alt+F11 and learn the workspace 4 min
- 142 Working in the VBA editor Macro security, trust settings, switching to Excel 6 min
- 143 Your first VBA code Modules, worksheets, rows, columns and formatting 4 min
- 144 VBA variables and data types Sub vs function for Excel beginners 6 min
- 145 VBA functions in Excel Build GetLastUsedRow with find and exit function 5 min
14 VBA and macros in Excel: FormatWizard The checks themselves: a routine that resets the Flag column's messages and fills, a loop built with For Next that marks empty cells even when they hold only spaces, If Else that builds one message from several tests, Interior.Color and RGB to colour the offending cell, and IsNumeric to catch an entry in a figures column that cannot be read as a number.
- 146 Clear old flags with VBA Reset messages and fill colours with if statements 5 min
- 147 For Next loop in VBA Flag missing region values in Excel 4 min
- 148 VBA If Else and loops Check missing sales data and build a FlagText message 5 min
- 149 Highlight cells with VBA Interior.Color and RGB for missing data 5 min
- 150 IsNumeric in VBA Validate unit price and amount data types in Excel 7 min
14 VBA and macros in Excel: FormatWizard Proof and one button: Debug.Print, its output read in the Immediate window, to see which rows and values the code reads before it writes a thing, then RunFullValidation, a master macro that calls every check in order with screen updating off and an error handler that names the fault.
- 151 Debugging VBA for beginners Debug.Print and the Immediate window 5 min
- 152 Complete Excel validation macro One VBA subroutine with an error handler 3 min
Instructors
Who teaches it.
Instructor, Excel with AI
Virginia Thorn
Emmy Award winner. Teaches Excel with AI at Coding Liquids.
Questions
Asked before starting.
Excel macros and VBA for reconciliation analysts: can I learn them on a worked example that checks a whole export in one run?
Yes, on a worked example of exactly that kind: The Complete Excel Course with AI Integration from Coding Liquids builds its macros and VBA around FormatWizard, one of the course's industry-standard projects, designed after talking with people from many different industries. Its sheet holds thousands of sales rows, checked from top to bottom by one master macro. The 17 lessons on this page, 1 hour 16 minutes of video, take you from a first recorded macro to code that clears old flags, finds the last row, marks blanks and non-numeric entries in words and in colour, and reports its own errors. You write every line yourself from the starter file, with the complete macro-enabled workbook beside you to compare against. Point the same checks at the reference, date and amount columns of your bank and ledger exports and the morning's pre-match review runs in the time it takes to open your inbox.
What does one press of the macro button do to the morning's exports?
It clears, measures, tests and marks them in one run, and The Complete Excel Course with AI Integration builds each step on FormatWizard's data. First it wipes the previous run's messages and fills from the Flag column, so nothing from yesterday survives into today (Lesson 146). Then it finds where today's data ends, however many lines arrived (Lesson 145), and loops down every row testing the cells a match depends on: an empty key cell earns a written flag and a coloured fill (Lesson 147 to Lesson 149), and an entry in a figures column that cannot be read as a number is flagged as invalid (Lesson 150). The lessons test region, salesperson and the per-unit figure; your reference, value date and amount columns take their place. A line that would have failed to match for want of a reference is caught before the match, not explained after it.
Recording the morning's formatting is easy: when does a reconciliation need VBA written by hand?
The moment the macro has to decide something, and The Complete Excel Course with AI Integration shows exactly where that line falls. A recorded macro replays what you did: Lesson 137 records the formatting of a row holding a negative amount, and Lesson 138 records it again with relative references, so it formats whichever row you start from. That suits fixed steps, the same column widths, number formats and headers every morning. Lesson 142 then reads the recorded code and points out its limit: it formats the row without checking that the amount is negative at all. Choosing which rows need attention, reaching the last row of a file whose length changes daily, and writing a reason beside each line all need code with If statements and loops, which the lessons from Lesson 143 onwards write one piece at a time.
Today's statement has more lines than yesterday's: will the macro still reach the last one?
Yes, because it never assumes a length: The Complete Excel Course with AI Integration builds a function that locates the final used row afresh on every run. GetLastUsedRow, written in Lesson 145, searches the sheet from the bottom upwards for the last cell holding anything and hands that row number to whichever macro called it. On the lesson's data it answers 5071, and once one more row is pasted in, 5072, with nothing in the code changed. The function guards the other extreme too, returning zero when the sheet is empty, and the clean-up routine of Lesson 146 stops with a message when only the headers are there, as on a day a file arrives with no transactions in it. Every loop in the section then runs from the second row to that last row, so a quiet day and a heavy month end pass through the same macro without an edit.
Can the macro mark lines with no reference, no value date or no account?
Yes, every one of them, with a written reason and a colour, and The Complete Excel Course with AI Integration builds the method in three steps. Lesson 147 loops down the rows and writes a flag into the Flag column wherever a key cell is empty, testing the cell's Trim so one holding only spaces counts as empty too, a detail that matters with exports padded out with blanks. Lesson 148 tests two columns in the same loop and builds one message per row, the reasons joined by a pipe, so a line missing both its reference and its date says so in a single cell. Lesson 149 colours the empty cell itself with Interior.Color and an RGB value, a visual layer on top of the text. The lessons check region and salesperson; renamed, the same loop checks your references, value dates and account codes.
Will VBA catch an amount field holding a word, an N/A or a stray character?
Yes: The Complete Excel Course with AI Integration builds that test with IsNumeric in Lesson 150, and it runs before the amount ever reaches a match. For each row the macro asks whether the value can be read as a number; where it cannot, the cell and its flag turn light red and the flag calls the entry invalid rather than missing, so a reviewer knows the field holds the wrong thing, not nothing. On a statement extract that means a narrative slipped into the amount column, an N/A carried over from a formula upstream, or a stray character left by the bank's file layout. The lesson checks the per-unit figure of each sale; your debit, credit or amount columns take its place. Numbers stored as text need a different net, and the course has two: COUNT set beside COUNTA (Lesson 35) and the data types of Power Query (Lesson 158).
Our exports carry reversals as negative amounts: can a macro pick them out?
Yes, and the very first macro in the course works on such a line. In The Complete Excel Course with AI Integration, Lesson 137 records a macro that formats a row holding a negative amount in bold, italic and a highlight, run from a keyboard shortcut, and Lesson 138 records it again with relative references so it formats whichever row you start from: select a reversal, press the keys, and it is marked. To find every negative line without selecting each one in turn, use the pattern the later lessons teach: the loop of Lesson 147 walking the rows, an If test in the shape it uses for blanks, here written against the amount column, and the fill of Lesson 149 on each line that fails. A recorded macro marks the row you choose; a loop chooses the rows for you, every morning, however many reversals the file holds.
Can each flagged line say why it was flagged, so a reviewer can follow?
Yes, in words in the Flag column and in colour on the cell, and The Complete Excel Course with AI Integration builds both. Lesson 148 writes the reasons as text, a message such as Region missing or Salesperson missing, joined by a pipe when one row fails more than one test, so the reviewer reads the cause, not a bare mark. Lesson 149 adds the colour, and Lesson 152 makes the last check append its reason after a pipe instead of overwriting, because two routines writing to one cell must add to it or the second erases the first. The Flag column ends up holding every reason a line was stopped, and it filters, sorts and summarises like any other column: a ready list of exceptions for whoever signs the reconciliation off, cleared and rebuilt on every run.
Online code samples match a bank tab against a ledger tab: does the course teach that kind of macro?
The Complete Excel Course with AI Integration teaches the parts those samples are built from, and teaches the matching itself where Excel shows it most plainly. The parts: a worksheet held in a variable (Lesson 143), the last row found (Lesson 145), a loop with If tests (Lesson 147, Lesson 148), flags and colours (Lesson 149), and an error handler with screen updating switched off (Lesson 152), the very lines such a reconciler opens with. The matching: COUNTIFS asking how often a key appears on the opposite side (Lesson 37), XLOOKUP (Lesson 69) and a merge in Power Query (Lesson 163). The dictionary object many samples rely on is not covered; what you gain is the means to read a sample line by line, change it safely, and judge when a formula would do the job more transparently.
What happens if the macro meets an error halfway through the morning run?
It stops cleanly and tells you why, because The Complete Excel Course with AI Integration closes the section with an error handler. RunFullValidation, built in Lesson 152, opens with On Error GoTo ErrHandler and switches screen updating off so the checks run faster. If anything fails along the way, a sheet renamed overnight for instance, control jumps to the handler, which switches screen updating back on and shows the error's own description in a message, instead of leaving you facing a half-flagged sheet and a frozen screen. The same lesson fixes a misspelt call that stops the code compiling, and earlier lessons clear two more compile errors, a missing End With and a missing Dim caught by Option Explicit, so the messages Excel shows are familiar long before code of your own raises one.
Before a new check runs on the live reconciliation, how can I see what it would read and change?
With Debug.Print and a test on a copy, both of which The Complete Excel Course with AI Integration builds into the section. Lesson 137 makes the stakes plain the first time a macro runs: Ctrl+Z cannot undo what a macro did. Lesson 151 then uses Debug.Print to send each row number, with the value the code reads there, to the Immediate window, which writes nothing to the sheet and shows no pop-up, so you confirm the code reads the right cells in the right order before it is allowed to flag hundreds of rows. Add the habits the section teaches along the way, a macro-enabled copy saved as .xlsm (Lesson 140) and content enabled only for files you trust (Lesson 142), and a new check is proved on a copy of yesterday's export before the live reconciliation ever sees it.
I run several reconciliations a day: can the checks I write once serve every one of them?
Yes: The Complete Excel Course with AI Integration builds every check as a routine of its own, so it can be called from anywhere it is needed. GetLastUsedRow in Lesson 145 is a function that any later macro calls, and it takes the sheet to measure as its argument, which is how one shared piece of code is told where to work. Lesson 146 declares it Public so routines in other modules can reach it, where Private would keep it inside its own. The checks then sit in separate modules, the clean-up, the blank tests and the number test, and Lesson 152 joins them in RunFullValidation, a master macro that calls each in turn. Give the bank, card and intercompany reconciliations a master macro each, calling the same checks, and a fix made to one check reaches every reconciliation that uses it.
Can colleagues on the team run the checks from a button without opening the code?
Yes, and The Complete Excel Course with AI Integration sets that up before a line of code is written. Lesson 139 turns on the Developer tab, then adds a macro to the Quick Access Toolbar as a button with its own icon, so whoever has the file runs the checks with one click. Lesson 140 saves the workbook as .xlsm, because a standard workbook strips every macro out when saved, and Lesson 142 covers the yellow bar that disables macros as a file opens and the trust settings behind it. A macro also does the same thing every time, whoever presses the button, which keeps a team's reconciliation consistent from one analyst to the next. For your own use, Lesson 137 points to the Personal Macro Workbook, which keeps a recorded macro at hand whenever Excel opens on that computer, whichever export is open.
Is anything replacing Excel macros for reconciliation work, or are they still the tool to learn?
Macros remain the tool for checks inside the workbook, and The Complete Excel Course with AI Integration teaches the tools around them as well, so you choose by the job. VBA acts on the cells of the open workbook: the FormatWizard checks run in one click with nothing else involved. Power Automate Desktop works from outside, launching Excel, reading a worksheet and writing back, and AutoFlow builds it from Lesson 174, on Windows. Power Query reruns a clean-up on every refresh, and the AI tools draft code: in Lesson 148, Claude and ChatGPT, each in its own window, produce pieces of the two-check macro that you then put right yourself. For a reconciliation, the macro is still the quickest way to put the same tests on every line the moment a file opens, and knowing VBA is what lets you trust code an AI writes for you.
Excel with AI
See the whole course.
The Complete Excel Course with AI Integration: 16 hours of video in 186 lessons, built around 14 industry-standard projects, with lifetime access, a Certificate of Completion and a 14-day money-back guarantee.
The same course
For another job, skill, goal, level, topic or comparison.
The course for this job
The course for this skill
More skills for this job
- Formulas for reconciliation analysts
- Lookups for reconciliation analysts
- PivotTables for reconciliation analysts
- Charts for reconciliation analysts
- Dashboards for reconciliation analysts
- Conditional formats for reconciliations
- Data cleaning for reconciliations
- Data validation for reconciliations
- Excel tables for reconciliation analysts
- Text functions for reconciliations
- Date functions for reconciliations
- Dynamic arrays for reconciliations
- Power Query for reconciliation analysts
- Power Pivot and DAX for reconciliations
- Power Automate for reconciliations
- Copilot for reconciliation analysts
- ChatGPT for reconciliation analysts
- Claude for reconciliation analysts