The Complete Excel Course with AI Integration

Excel macros and VBA for accounts payable clerks

For accounts payable clerks who check each week's invoice batch by eye before it is paid: a missing supplier code, a note typed where an amount belongs, last week's highlights still on the sheet. The Complete Excel Course with AI Integration turns that routine into VBA on FormatWizard, an industry-standard project, and this page picks out its lessons in the order a batch check is built, from a first recording to one macro behind an error handler.

Taught by Sagnik Bhattacharya and Virginia Thorn

The Complete Excel Course with AI Integration: Sagnik Bhattacharya and Virginia Thorn

What you will be able to do

At work, you will be able to:

  • Record a macro that formats a credit note row in one keystroke, with relative references so it works on whichever invoice line you select.
  • Run macros from a button on the Developer tab or the Quick Access Toolbar, and save the payables workbook as a macro-enabled .xlsm file.
  • Write a VBA function that finds the last used row, so a check covers every line of this week's export however long it has grown.
  • Loop through an invoice list with For Next and If statements, flagging each line that lacks a supplier code or an order number in one FlagText message.
  • Colour the cell at fault with Interior.Color and RGB, and test an amount column with IsNumeric for entries that are not numbers at all.
  • Clear last week's flags and fills before a new run, and watch the code with Debug.Print in the Immediate window before it writes a thing.
  • Gather every check into one subroutine behind an error handler, run with one click before the payment batch goes for approval.

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.

    A macro project built on a sheet of sales records, from a first recording to a validation macro. For an AP clerk it is the pattern of a pre-payment check: every fault on an invoice line written into a flag column, the cell at fault coloured, the whole batch read in a single run.

  • Project 14

    Agentic AI in Excel

    AI finds and fixes the formula; you check it before it counts.

    Built to put Copilot, ChatGPT and Claude to work on real Excel tasks, it supplies the checklist habit an AP clerk needs once an assistant starts drafting VBA for the payables file: prompt, review, and sign off only what you have tested.

Tap or pinch to zoom in, drag to move around. Click or scroll to zoom in, drag to move around.

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

Start at Lesson 136 if you key invoices into Excel and write simple formulas: the section assumes no programming, and its opening lessons record macros without a line of code. Recording macros already? Move on to Lesson 141, where the editor opens and the written checks begin. Comfortable with VBA basics? Lesson 146 is where the loop, the flags and the IsNumeric test are built. If Excel itself is new, begin the course at Lesson 1 and come here once formulas are familiar.

17 of 186 lessons · 1 h 16 min

14 VBA and macros in Excel: FormatWizard 5 of 17 lessons · 19 min Macros with no code: what a macro is, a first recording that formats a row holding a negative amount, the way a credit note sits in an invoice list, relative references that make it follow the selected line, a button and the Quick Access Toolbar, and the .xlsm format that keeps it.
  1. 136 Start here Excel macros and VBA for beginners What macros are, the FormatWizard project 3 min
  2. 137 Record your first Excel macro Name, run and use absolute references 6 min
  3. 138 Relative references in Excel macros Make recorded macros dynamic 4 min
  4. 139 Developer Tab in Excel Run macros from a button and the quick access toolbar 4 min
  5. 140 Save macros in Excel Macro-enabled workbooks and the XLSM file format 3 min
14 VBA and macros in Excel: FormatWizard 5 of 17 lessons · 23 min Into the VBA editor with Alt+F11, the trust settings that decide which payables files may run code, a first line that points at the right worksheet, variables and data types, and GetLastUsedRow, a function that tells every later check where this week's data ends.
  1. 141 The VBA Editor in Excel Open it with Alt+F11 and learn the workspace 4 min
  2. 142 Working in the VBA editor Macro security, trust settings, switching to Excel 6 min
  3. 143 Your first VBA code Modules, worksheets, rows, columns and formatting 4 min
  4. 144 VBA variables and data types Sub vs function for Excel beginners 6 min
  5. 145 VBA functions in Excel Build GetLastUsedRow with find and exit function 5 min
14 VBA and macros in Excel: FormatWizard 5 of 17 lessons · 27 min The batch check itself: old flags and fills cleared, a For Next loop that flags a missing value, two faults gathered in one FlagText message, the empty cell coloured with RGB, and IsNumeric on a number column for entries that are not numbers. The lessons check sales records; an invoice batch is checked the same way.
  1. 146 Clear old flags with VBA Reset messages and fill colours with if statements 5 min
  2. 147 For Next loop in VBA Flag missing region values in Excel 4 min
  3. 148 VBA If Else and loops Check missing sales data and build a FlagText message 5 min
  4. 149 Highlight cells with VBA Interior.Color and RGB for missing data 5 min
  5. 150 IsNumeric in VBA Validate unit price and amount data types in Excel 7 min
14 VBA and macros in Excel: FormatWizard 2 of 17 lessons · 8 min Making it safe to rely on: Debug.Print and the Immediate window prove the code reads the right cells before it writes, then RunFullValidation calls every check in order behind an error handler, the one macro a clerk runs before each payment batch.
  1. 151 Debugging VBA for beginners Debug.Print and the Immediate window 5 min
  2. 152 Complete Excel validation macro One VBA subroutine with an error handler 3 min

Instructors

Who teaches it.

Virginia Thorn smiling at the camera, dark hair tied back, wearing a navy top.

Instructor, Excel with AI

Virginia Thorn

Emmy Award winner. Teaches Excel with AI at Coding Liquids.

Questions

Asked before starting.

How far can an accounts payable clerk get with Excel macros and VBA, and which course starts from a first recording?

Far enough to hand the weekly batch check to one button. The Complete Excel Course with AI Integration from Coding Liquids teaches macros and VBA on FormatWizard, an industry-standard project designed after talking with people from many different industries: you record a macro, write VBA that finds the end of the data, loop through every row, flag what is missing, test number columns with IsNumeric, colour each fault and run the lot behind an error handler. The 17 lessons on this page take 1 hour 16 minutes, and each is tied here to payables work: credit notes formatted in one keystroke, invoice lines checked for a supplier code or an order number, a note typed into the amount column caught before the run. The practice files include a starter workbook and the finished macro-enabled one, so your code always has a working version to set beside it.

Which payables chores are worth a macro, and which lessons build each one?

Three kinds, and The Complete Excel Course with AI Integration builds each one in turn. Formatting you repeat every week, such as marking credit notes or formatting an export the same way each time, is recorded once and replayed from a shortcut or a button (Lesson 137 to Lesson 139). Checks you make by eye, such as a line with no supplier code or a note where an amount belongs, become a loop that reads every row and writes what is wrong beside it (Lesson 147 to Lesson 150). Routines with several steps become one subroutine that clears the old flags, runs each check in order and reports when it is done (Lesson 152). Ageing is a formula job rather than a macro one, built from the IFS and TODAY lessons earlier in the course. Leave the macro to what repeats, and spend the time saved on the exceptions it lists.

Credit notes arrive in the invoice list as negative amounts: can a recorded macro mark each one without code?

Yes, and the first macro The Complete Excel Course with AI Integration records is that very job. In Lesson 137 the row holding a negative amount is formatted bold, italic and highlighted while the recorder runs, the macro is named and given a shortcut, and from then on one keystroke repeats it. A recording with absolute references always formats the same row, though, so Lesson 138 records it again with Use Relative References switched on, and the macro then formats whichever row you start from: select a credit note anywhere in the list and press the shortcut. Lesson 139 adds a button on the Quick Access Toolbar for colleagues who prefer a click. Keep one limit in mind, which Lesson 142 points out: a recording formats the row you choose without checking the amount is negative, and the checking arrives with the VBA lessons.

This week's export has more lines than last week's: how does the macro know where the invoices end?

It asks, every time it runs, through a function The Complete Excel Course with AI Integration has you build in Lesson 145. GetLastUsedRow uses Find to search upwards from the bottom of the sheet for the last cell holding anything, and returns that row number to whichever routine called it; a guard with COUNTA first returns zero for an empty sheet, so the code never searches nothing. The lesson proves it by pasting one more row and running it again: the answer moves down by one, with no line of code changed. Every check that follows loops from the second row to that number, so a short batch and a long month-end export are read to their last invoice alike. Lesson 146 adds the other guard a payables file needs, a stop with a message when the sheet holds only its headers.

Can a macro flag every invoice line that has no supplier code or no order number before the payment run?

Yes: The Complete Excel Course with AI Integration builds that check one step per lesson, on a sales sheet whose region and salesperson columns play the part of your supplier code and order number. Lesson 147 writes a For Next loop that visits every row, trims the cell so one holding only spaces still counts as empty, and writes a message in the flag column wherever it finds nothing. Lesson 148 tests both columns in the same loop and gathers each row's faults into one FlagText message, separated by a pipe, so a line missing both says so in one cell. Lesson 149 colours the empty cell itself a soft red with Interior.Color and RGB. Run it on the batch and the exceptions list writes itself: filter the flag column and only the lines that need a phone call or an email remain.

Someone typed TBC in the amount column: will the check catch it?

Yes, and it marks the cell as well as the line. Lesson 150 of The Complete Excel Course with AI Integration writes a loop that asks IsNumeric whether each entry in a number column can be treated as a number; a word, a note such as N/A or a stray character fails, and the macro colours that cell light red, colours the flag cell beside it and writes that the entry is invalid. The lesson runs it on the per-unit figures of a sales sheet, and pointed at the amount column of an invoice batch it catches the TBC, the pending note and the letter O typed for a zero before anyone totals the run. Digits held as text are a different fault, and the course clears that one at the source with Power Query's data types (Lesson 158), so each tool takes the fault it handles best.

The check will run on a fresh export every week: what stops one week's flags from mixing with the next?

A reset that runs first, which The Complete Excel Course with AI Integration writes as a routine of its own in Lesson 146. It finds the last row, clears every message from the flag column and removes the fill colours, so each run starts on a clean sheet, and the lesson tests it by typing a flag and a yellow fill into the column and watching both disappear. Lesson 152 then settles a second kind of mixing, two checks writing into one cell: the routine that tests number columns is changed to add its message after a pipe instead of overwriting, because otherwise the second check erases the first. Together they mean the flag column only ever shows this week's faults, every one of them, which is the column an approver should be reading before the batch is paid.

Can one button run every check on the payment batch, and what happens if something fails halfway?

Yes: The Complete Excel Course with AI Integration gathers the checks into RunFullValidation in Lesson 152, one subroutine that clears the old flags, runs the missing-value checks and the number check in order, and shows a message when it has finished. Screen updating is switched off while it works, which speeds up a long batch, and an error handler catches anything that goes wrong: instead of crashing, it restores the screen and shows what the error was, so a clerk who did not write the code still knows what to report. Put the macro on the Quick Access Toolbar (Lesson 139) and the pre-payment check becomes one click. Before relying on it, Lesson 151 shows how Debug.Print writes to the Immediate window what the code is reading, row by row, without touching the sheet.

If ChatGPT drafts the macro that checks my payment batch, how will I know it is safe to run?

By reading it the way The Complete Excel Course with AI Integration teaches you to, before it touches a live file. In Lesson 148 part of the code is written with Claude or ChatGPT and then corrected, so the course treats an assistant's draft as a draft. The lessons around it give you the tests: Option Explicit, which refuses a variable that was never declared and so catches a mistyped name (Lesson 144); Debug.Print, which shows the cells the code reads before it writes anything (Lesson 151); and an error handler that reports a fault in plain words (Lesson 152). Remember too that Ctrl+Z cannot undo a macro, a point Lesson 137 makes early, so a draft runs first on a copy of the batch. The AI section adds a short checklist for testing an assistant's output (Lesson 99).

Office Scripts and flows are said to be replacing macros: is VBA still worth an accounts payable clerk's time?

Yes: VBA is the language behind every macro in desktop Excel, where invoice registers and payment batches are worked on, and The Complete Excel Course with AI Integration teaches it from the recorder up. Excel on the web runs Office Scripts instead, and those are not part of the lessons. The course does teach the other tool people name, Power Automate Desktop, in AutoFlow from Lesson 174, on Windows, and its closing lesson sets the two side by side: a macro usually runs faster over a long sheet, while a flow shows its logic as a picture anyone can follow (Lesson 185). Learn both and you choose per job, VBA for checks inside the workbook, a flow for a routine that opens, reads and writes Excel from outside. A clerk who can read and correct VBA is also the person who can judge a macro an assistant drafts.

The payables workbook is shared with the team: what should colleagues know before they open a file with macros?

Two things, and The Complete Excel Course with AI Integration teaches both before your first line of code. A workbook with macros must be saved as an Excel Macro-Enabled Workbook: Lesson 140 shows that the plain .xlsx format strips out every macro on saving, so a colleague who saves your file the usual way loses the checks. And Excel disables macros until someone chooses Enable Content on the yellow bar, which Lesson 142 explains together with the trust settings, and the advice is to enable content only for files you trust. Keep the team's checks inside the shared .xlsm, where they travel with the data, and keep your own formatting shortcuts in the Personal Macro Workbook from Lesson 137, which opens with Excel on your computer only. A macro then runs the same way for every colleague who presses the button.

My formulas stop at IF and SUMIFS: is that enough to start on the VBA lessons?

Yes, more than enough, because The Complete Excel Course with AI Integration starts this section for beginners and adds a single idea per lesson. The opening run needs no code at all: you record, replay, add a button and save (Lesson 136 to Lesson 140). When code arrives, the lessons explain it in everyday terms: a variable is likened to a nickname for a long contact name (Lesson 143), a Sub does a job while a Function hands an answer back (Lesson 144), and the loop's row counter is compared to a finger moving down a list, one row each pass (Lesson 147). Your IF logic carries straight over to the If statements that decide whether a line is flagged. Lesson 151 teaches debugging for beginners, and on the instructor support plan a question about your own batch check goes to the instructor in writing.

How soon will a macro save me time on the weekly batch, and which files do I keep?

Within the first few lessons, well inside the 1 hour 16 minutes of the whole path. By Lesson 140 of The Complete Excel Course with AI Integration you have a recorded macro on a button that formats any line you select, saved in a workbook that keeps it, which is enough to stop reformatting each export by hand. The written checks follow one short lesson at a time until Lesson 152 joins them into the full validation macro. You keep the FormatWizard starter workbook you build in and the completed macro-enabled workbook to compare against, and the finished file doubles as a template: change the columns it checks and it reads your invoice batch. Lifetime access means the section is still there when next year's export arrives with a new column to test.

Payables job ads ask for Excel macros: what could I show and explain at an interview after this path?

A working validation macro of your own, and every reason behind its parts. FormatWizard, the project you build in The Complete Excel Course with AI Integration, ends as a macro-enabled workbook in which you can walk an interviewer through GetLastUsedRow, the loop that reads each row, the FlagText message, the IsNumeric test and the error handler (Lesson 145 to Lesson 152). Asked how you would stop a bad line reaching a payment run, you can open the file and show it, which says more than a line on a CV. Asked about recorded macros, you can explain absolute against relative references and why the file is saved as .xlsm. Completing the course adds a Certificate of Completion, sent as a PDF with a verification link an employer can check, while the course's section quizzes confirm along the way what stuck.

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.