The Complete Excel Course with AI Integration

Excel macros and VBA for document controllers

Every week the register gets the same treatment by hand: formatting reapplied, rows scanned for a missing title, revision or status, the gaps coloured and old flags cleared. The Complete Excel Course with AI Integration hands that routine to a macro on FormatWizard, an industry-standard project, and this page picks out its lessons in the order a register audit is built: recording, the VBA editor, loops that flag and colour, and one master macro with 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 the register's weekly formatting as a macro with absolute or relative references, and give it a keyboard shortcut of its own.
  • Run a register macro from a Quick Access Toolbar button or the Developer tab, and save the workbook as .xlsm so the code stays inside it.
  • Open the VBA editor, find recorded code in its module, enable content only for trusted files and fix a compile error before it stops a run.
  • Point VBA at the register sheet with a worksheet variable and find its last used row with a reusable GetLastUsedRow function, so a macro reaches next week's rows too.
  • Loop through every register row with For Next and If Else, writing one flag message per row that names each missing field.
  • Clear last run's flags and fills first, then colour each empty cell with Interior.Color and RGB so the gaps stand out on screen.
  • Flag an entry in a number column that is not a number, such as a word or N/A in a sheet count or a days-in-review column, and colour the cell.
  • Check what a macro reads with Debug.Print before it writes, and run the whole register audit from one master macro with an error handler.

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 of thousands of rows, it becomes a register audit once your columns take the place of its own: last run's flags cleared, every row read, a message naming each gap written beside it, empty cells coloured and a column of figures tested, all from one master macro.

  • Project 13

    AutoFlow

    The weekly report routine, run by a flow instead of by you.

    Built around a weekly sales report, it shows the automation that works from outside a workbook: Power Automate Desktop flows that open a file, read and write its cells and start from a desktop shortcut, the partner to a macro when a routine runs across files. Its lessons need Excel for Windows.

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 whatever your experience with code: the section opens by recording a macro, and each lesson builds on the one before until the register audit runs from one button. Already recording macros? Move on to Lesson 141 for the VBA editor, or to Lesson 146 if you read VBA and want the flags, loops and error handler. New to Excel itself? Begin at Lesson 1, and come here once your register is a clean Excel table, which Lesson 19 teaches.

17 of 186 lessons · 1 h 16 min

14 VBA and macros in Excel: FormatWizard 5 of 17 lessons · 19 min Macros before code: what a macro and VBA are, a first recording that formats a problem row, relative references so one shortcut works on any row, a Developer tab and a toolbar button to run it, and the .xlsm format that keeps the code when the file is saved. For a document controller this is the register's fixed formatting routine, reduced to one click.
  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 Inside the VBA editor: three ways to open it, recorded code read in its module, macro security and Enable Content, a compile error fixed, then a first line that points at a worksheet, variables declared under Option Explicit, a Sub set beside a Function, and GetLastUsedRow, which finds the last filled row so a macro keeps pace as the register grows.
  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 7 of 17 lessons · 34 min The audit itself: old flags and fills cleared, a For Next loop that marks every row with a missing value, If and Else building one message per row, empty cells coloured with RGB, IsNumeric marking an entry in a number column that is not a number, Debug.Print checks in the Immediate window, and a master macro with an error handler that runs it all. The lessons check region, salesperson and the per-unit figure on sales rows; your title, revision and status columns take their places.
  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
  6. 151 Debugging VBA for beginners Debug.Print and the Immediate window 5 min
  7. 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.

Instead of borrowing document control macros from forum threads, how does a document controller learn to write Excel macros and VBA they can trust?

By building one macro of their own, from a first recording to a full register audit, which is how The Complete Excel Course with AI Integration from Coding Liquids teaches Excel macros and VBA on FormatWizard, an industry-standard project designed after talking with people from many different industries. Across 17 lessons, 1 hour 16 minutes in all, you go from a recorded macro (Lesson 137) to RunFullValidation (Lesson 152), a master macro that clears the last run's flags, reads every row, writes a message beside each row with a gap, colours the empty cells, tests a column of figures and reports any error instead of crashing. A macro copied from a thread is a black box; one you have written line by line is one you can read, adapt when the register gains a column and explain when an auditor asks what it checked. The lessons audit a sales sheet of thousands of rows, and the same loops take your register's title, revision, status and discipline columns.

Which register chores suit a recorded macro, and which need VBA written by hand?

Anything done the same way every time suits the recorder; anything that has to look before it acts needs VBA, and The Complete Excel Course with AI Integration draws that line clearly. Lesson 137 records a macro that formats a row, and Lesson 142 points out the catch: recorded code formats without checking anything. So the recorder is the tool for the register's fixed routines, such as setting up the weekly status sheet with the same widths, fonts and fills. Checks need decisions, and decisions need code: a loop that visits every row (Lesson 147), If and Else that test each cell (Lesson 148), IsNumeric for figures (Lesson 150). Producing transmittals as PDF files, renaming files in folders or logging every edit are larger builds than the lessons go, while the variables, loops, conditions and error handling such tools rest on are all taught here.

Can one shortcut mark whichever register row I am on as superseded, not only the row I recorded it on?

Yes: that is what relative references are for, and The Complete Excel Course with AI Integration teaches them in Lesson 138. A macro recorded the ordinary way, as in Lesson 137, remembers fixed cells, so it formats the row it was recorded on and no other, and Ctrl+Z cannot take its work back. With Use Relative References switched on before recording, Excel follows your movement from the starting cell instead, and the lesson proves it by running the macro on a different row from the one it was recorded on. For a register, record the look you give a superseded or withdrawn document, a grey fill and italic text perhaps, give it a shortcut of Ctrl+Shift and a letter, and from then on one keystroke on any row applies it. Lesson 139 adds a button on the Quick Access Toolbar for colleagues who would rather click than remember a key.

Can a macro flag every register row that is missing its title, revision or status?

Yes, with a message in a flag column that names every gap in the row. The Complete Excel Course with AI Integration builds it in steps. Lesson 147 writes a For Next loop that moves down the sheet a row at a time and, wherever a cell holds nothing, writes a missing message beside it; it trims the cell first, so a cell holding only spaces counts as empty too. Lesson 148 tests two columns in the same loop and builds one message per row, emptied at the start of each row so nothing carries over, with a pipe between messages, so a row missing two things says both. The lessons test region and salesperson on sales rows. Add a test for each column your register needs, title, revision, status, discipline, and every incomplete line carries its own list of what to chase, ready to filter on before the next transmittal goes out.

Can the macro colour the gaps as well, so a reviewer sees them without reading the flags?

Yes, and The Complete Excel Course with AI Integration adds the colour in Lesson 149: each empty cell the loop finds is filled a soft warning red with Interior.Color and RGB, while the message still goes into the flag column. That gives the register two layers from one run, a colour that catches the eye as someone scrolls and a written flag that can be filtered and counted. The lesson also shows the slip to watch for: copy the colouring line into a second check without changing its column letter and the wrong column lights up, which is why each check names its own column. RGB mixes red, green and blue from 0 to 255, so the shade can follow whatever your document control procedure uses for an incomplete entry. Unlike a fill applied by hand, it lands in exactly the same way on every run, however many rows the register holds.

Some sheet counts in our register read N/A or TBC: can a macro catch entries like those in a number column?

Yes: Lesson 150 of The Complete Excel Course with AI Integration builds exactly that check with IsNumeric. The macro walks down a column that should hold numbers and, wherever an entry is not a number, a word, a note such as N/A, a stray character, it colours the cell and the flag cell light red and writes an invalid message in the flag column. The lesson runs it on the per-unit figure of a sales sheet; in a register the same check suits the number of sheets, days in review or any column a total will later read. The message says invalid rather than missing, so the flag column tells a reviewer the difference between an empty cell and a wrong one. Option Explicit earns its place in the same lesson too, catching an undeclared variable before the macro is allowed to run at all.

Last week's flags are still sitting in the register: how does the macro start from a clean sheet?

With a clean-up routine that runs before every check, which The Complete Excel Course with AI Integration writes in Lesson 146. It clears the flag column's messages and its fill colours from the first data row down to the last, so this week's flags never mix with last week's, and it stops politely with a message if the sheet holds nothing but headers. The same lesson makes the last-row function Public, so every module of the workbook can call it, which is how one function serves the whole audit. In the finished build of Lesson 152, the master macro calls this clean-up first and the checks after it, in a fixed order. For a register reviewed every week, that order is the difference between a flag column you can trust and one where nobody knows which flags are still true.

New documents join the register every week: will the macro still reach the last row?

Yes, because the macro finds the last row for itself each time it runs. The Complete Excel Course with AI Integration builds that in Lesson 144 and Lesson 145: a Sub declares its variables under Option Explicit, then calls GetLastUsedRow, a Function that searches upwards from the bottom of the sheet with Find and hands back the last filled row. The lesson proves it by adding a row and running again, and the answer moves down by one. A guard with COUNTA returns zero for an empty sheet instead of failing. Every check that follows uses this function to set where its loop stops, so the audit covers this week's documents and next week's without a single line being edited. It is also the lesson that separates a Sub, which does a job, from a Function, which hands an answer back, the distinction the rest of the section leans on.

How can I be sure a macro reads the right cells before it writes flags across the whole register?

By making it show its reading first, which The Complete Excel Course with AI Integration teaches in Lesson 151. Debug.Print sends a line to the Immediate window, opened with Ctrl+G, for each row the code visits, with the row number and the value it found, and it writes nothing to the sheet and raises no pop-up. Reading the first few lines tells you whether the loop starts where it should and looks at the column you meant, before any flag lands. That matters on a register because Ctrl+Z cannot undo a macro, as Lesson 137 warns, so a mistake would otherwise spread over every row in one run. Option Explicit, which refuses a misspelt variable (Lesson 144), backs it up, and a first run on a copy of the register costs nothing and settles any remaining doubt.

What happens if the macro meets an error halfway down the register?

It tells you what went wrong and restores the screen, because The Complete Excel Course with AI Integration ends the section with an error handler in Lesson 152. The master macro opens with On Error GoTo, switches screen updating off so the run is quicker, calls the clean-up and each check in turn, and switches it back on at the end. If anything fails on the way, the handler turns screen updating back on and shows the error's description in a message, instead of leaving a half-finished run and a screen that looks frozen. The same lesson fixes a quieter fault: two checks writing to one flag cell must add to it after a pipe, or the second erases the first. That is the standard to hold a register audit to: every gap reported, nothing overwritten, and a plain message when something stops it.

Colleagues open the register from a shared drive: will the macros go with it, and is it safe to enable them?

Yes to both, with the habits The Complete Excel Course with AI Integration teaches. Saved as an Excel Macro-Enabled Workbook, the .xlsm format of Lesson 140, the code travels inside the register, while a save as an ordinary .xlsx would strip every macro out. When a colleague opens it, Excel holds the code back behind a yellow bar until Enable Content is clicked, and Lesson 142 gives the rule: enable it only for files you trust, and a register your own team keeps is such a file. For checks you want on every workbook, not only the register, Lesson 137 points to the Personal Macro Workbook, which keeps a macro ready whenever Excel starts on your computer. A button on the Quick Access Toolbar (Lesson 139) then lets anyone run the check without opening the editor at all.

Is VBA still worth learning for document control, now that Power Automate can run Excel too?

Yes, and The Complete Excel Course with AI Integration teaches both, so the choice stays yours. Inside a workbook VBA is the quicker tool: the course's own comparison in Lesson 185 notes that a macro usually runs faster than a flow working through rows one at a time, and FormatWizard's audit reads thousands of rows in one run. Power Automate Desktop works from outside: its flows open a workbook, read and write cells and start from a desktop shortcut (Lesson 180), with logic laid out step by step for anyone to follow, and its lessons need Excel for Windows. A document controller has work for each: the register's own checks and formatting belong to a macro inside the file, while a routine that opens files and moves between programs suits a flow. With lifetime access, both stay ready for whichever routine your project asks you to automate next.

ChatGPT drafted a VBA loop for our register: which lessons teach me to tell whether it is safe to run?

The lessons that teach you to read VBA, and The Complete Excel Course with AI Integration has one that practises exactly this. In Lesson 148, after building a two-check loop, learners write parts of the macro with Claude or ChatGPT in its own window and then correct them. What makes the correcting possible is everything before it: the editor and its modules (Lesson 141), a variable pointed at the right sheet (Lesson 143), declared types under Option Explicit (Lesson 144) and the last-row function a loop should use (Lesson 145). Then test before trusting: Debug.Print shows what the loop reads (Lesson 151), and the error handler of Lesson 152 reports a failure instead of hiding it. A draft that fixes the last row by hand, writes over the flag column or names the wrong sheet is easy to spot once you can read each line, and that reading is the skill you leave with.

Could next Monday's register check run from a button if I start the lessons this week?

Yes: the formatting routine can be on a button within an evening, and the full audit follows close behind. In The Complete Excel Course with AI Integration, a first macro is recorded in Lesson 137, made to work on any row in Lesson 138 and put on a toolbar button in Lesson 139, which is enough to format next week's register in one click. The whole path is 1 hour 16 minutes, so the written check, with its flags, colours, number test and master macro, fits into a few evenings, and the FormatWizard starter and complete files let you compare your code with a working version at every step. The lessons are recorded on Windows, with Windows shortcuts such as Alt+F11; on a Mac the screens look slightly different, as Lesson 139 itself notes. Lifetime access keeps the section on hand for the next check your register needs, and completing the course earns a Certificate of Completion.

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.