The Complete Excel Course with AI Integration
Excel macros and VBA for supply chain analysts
For the supply chain analyst who formats the same MRP exception report every week and reads ERP extracts line by line for gaps before the pack goes out. In The Complete Excel Course with AI Integration, FormatWizard turns those chores into code you write yourself: recorded macros first, then the VBA editor, loops that flag and colour rows, a check that catches a word or a note in a number column, and one 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 planning report gets every week as a macro, with relative references so it marks whichever line you start from, then start it with one click on the Quick Access Toolbar.
- Read and edit recorded code in the VBA editor, and save the checker as an .xlsm file so its code survives every save.
- Loop through every row of an extract with For Next, deciding each line with If and Else, from the first line to the last one GetLastUsedRow finds.
- Build one plain-English flag per row that names every gap, such as a missing lead time and a missing supplier, and colour the offending cells through Interior.Color, mixing an RGB shade.
- Catch entries in quantity and on-hand columns that hold no number at all with IsNumeric, before any comparison trips over them.
- Confirm what the code reads with Debug.Print, and run every check from one master macro whose error handler reports what went wrong.
- Decide which weekly chores belong to a macro, which to Power Query and which to a desktop flow.
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 as a validation tool for a sales sheet, it is the template for an extract checker: recorded formatting macros, GetLastUsedRow to find the bottom of the data, a loop that writes plain-English flags and colours each faulty cell, and one master macro with an error handler. Point its checks at supplier, lead-time and quantity columns and it guards the weekly pack.
-
Project 13
AutoFlow
The weekly report routine, run by a flow instead of by you.
Built to run the weekly sales report routine, it shows where VBA stops and a flow takes over: opening the workbook, reading rows and writing answers back from outside Excel, without code and on Windows.
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: FormatWizard opens with the recorder, so an analyst who has not coded before can follow from the first lesson, each step resting on the one before. New to Excel itself? The tables, filters and formulas from Lesson 1 onward come first, since a macro only repeats what you already know how to do by hand. Recording macros already? Your starting line is Lesson 141 and the editor itself.
17 of 186 lessons · 1 h 16 min
14 VBA and macros in Excel: FormatWizard Macros without code first: the idea of a macro and the FormatWizard tool it builds towards, a recording that formats a negative-amount row, the same recording made relative so it follows the row you pick, the Developer tab and a Quick Access Toolbar button, and the .xlsm format that keeps the code. An MRP exception report's weekly formatting is exactly this kind of job.
- 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 VBA editor: its modules and code window, macro security and the Enable Content bar, a first line that points code at a named sheet, declared variables under Option Explicit, and GetLastUsedRow, a function that finds where an extract of any length 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 check itself: last run's flags cleared, a For Next loop down every row, If and Else building one message per row that names each gap, light red fills through Interior.Color and RGB values, and IsNumeric marking entries in a number column that hold no number. Aim it at supplier, lead-time and quantity columns and it audits an extract.
- 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 Trust before the planning meeting: Debug.Print sending values to the Immediate window to confirm what the code reads, then one master macro that runs every check in order with screen updating off and an error handler that reports what went wrong.
- 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.
Which parts of a supply chain analyst's work with ERP extracts can Excel macros and VBA run, from MRP exceptions to the reorder check, and where is the code taught?
The Complete Excel Course with AI Integration from Coding Liquids builds them in FormatWizard, an industry-standard validation project designed after talking with people from many different industries. Its methods cover most of what Google's answer lists for supply chain work. Recorded macros take over repeated formatting, such as marking the negative balances in an MRP report (Lesson 137). Written VBA does the checking: a loop reads every row of an extract (Lesson 147), flags gaps such as a missing supplier or lead time in plain words (Lesson 148), colours each faulty cell (Lesson 149) and spots entries in a number column that hold no number (Lesson 150), all run from one master macro (Lesson 152). The 17 lessons here take 1 hour 16 minutes, with a starter workbook and the completed .xlsm to compare against. Solver and simulation models are not taught; the daily automation around them is.
The MRP exception report needs every line with a negative projected balance marked before the planning meeting: can a recorded macro do it?
It can format the line you point it at, and the VBA lessons that follow mark every one by themselves. FormatWizard's first macro in The Complete Excel Course with AI Integration deals with exactly this kind of row: Lesson 137 records the bold, italic, highlighted formatting of a row holding a negative amount and runs it from Ctrl+Q, and Lesson 138 records it again with relative references so it formats whichever row you start from. Lesson 142 then reads the recorded code and names its limit: it formats without checking that the amount is negative, so finding each shortage is still your job. The written code removes that: Lesson 147 walks every row with For Next, an If test picks the rows that need marking, and Lesson 149 colours them. Test for a negative projected balance where the lesson tests its own column, and the whole report is marked in one run, however many shortage lines this week brings.
One item can lack both its lead time and its safety stock: will the flag name both gaps, or only the first one found?
Both, side by side in one cell, which is how FormatWizard writes its flags. The Complete Excel Course with AI Integration builds the pattern in Lesson 148: inside the loop, a text variable called flagText is emptied at the start of every row, each check that fails adds its own message after a pipe, and the finished text goes into the Flag column, so a row missing its region and its salesperson reads both problems at once. Put lead time, safety stock and supplier where those columns stand, and the item master gets one honest line per SKU before the MRP run uses it. Around it, Lesson 147 trims each cell first, so a cell holding only spaces still counts as empty, and Lesson 149 gives the cell at fault a light red fill. Emptying the variable for each row is the detail that matters: skip it and one item's gaps spill into the next item's flag.
Google's answer has VBA walk the SKU table comparing on-hand stock with each reorder point: which lessons teach the pieces of that loop?
Every piece apart from the comparison itself, which is a single line of your own. In The Complete Excel Course with AI Integration, Lesson 145 builds GetLastUsedRow, a function returning the last filled row however long this week's stock sheet runs, so the loop always reaches the final SKU. Lesson 146 clears the previous run's messages and fills, Lesson 147 walks every row with For Next, Lesson 148 decides each row with If and Else and writes its message to a flag column, and Lesson 149 colours the cells that need attention. Lesson 150 adds the guard a stock sheet needs: IsNumeric flags an on-hand entry that holds no number at all, such as a note or N/A, before any comparison trips over it. The lessons test for missing and invalid entries; set on-hand below reorder point where their test sits and the same loop lists your shortages.
Google's safe VBA habits start with Option Explicit and results kept out of the raw data: does the course build those habits in?
Yes, from the first line of written code. The Complete Excel Course with AI Integration opens each module in Lesson 144 with Option Explicit, which forces every variable to be declared, and it earns its place in Lesson 150 by catching a missing declaration before the macro runs. FormatWizard never overwrites the data it checks: every message lands in a dedicated Flag column, and colour goes only on the cells at fault. Lesson 151 uses Debug.Print, which writes to the Immediate window, to confirm the code reads the right cells in the right order before it writes a single flag, and Lesson 152 wraps the run in an error handler that reports what went wrong instead of crashing. One habit comes from the very first recording in Lesson 137: Ctrl+Z cannot undo a macro, so the first run on a live order book belongs on a saved copy.
The ERP hands me a fresh workbook every Monday: can the checks still run on it without copying code into each file?
Yes, and The Complete Excel Course with AI Integration gives you two places to keep them. Recorded formatting macros can sit in the Personal Macro Workbook, which Lesson 137 introduces: a hidden workbook that opens with Excel on your computer, so its macros act on whatever file is in front of you, started from a Quick Access Toolbar button like the one added in Lesson 139. The written checks work best in a checker workbook of their own. FormatWizard's code points at the file that holds it and at a sheet called Data (Lesson 143), so paste each Monday's extract onto that sheet and run the full validation there, the code staying put week after week. Keep the checker in the macro-enabled format from Lesson 140: an ordinary .xlsx drops every macro when it is saved, which is why that lesson makes the .xlsm habit automatic.
The Monday clean-up, the exception check, the routine that opens and updates the tracker: which belongs to a macro, and which to Power Query or a flow?
Each has a natural owner, and The Complete Excel Course with AI Integration teaches all three. The Monday clean-up of a recurring extract belongs to Power Query: trims, replacements and data types recorded once and replayed on every file, a whole folder of them included (Lesson 157, Lesson 166). The exception check belongs to VBA, because it judges row by row inside the workbook and marks what it finds, FormatWizard's loops, flags and colours run from one master macro (Lesson 152). The routine of opening a tracker, reading its rows, writing an answer back and saving belongs to Power Automate Desktop, which AutoFlow builds without code (Lesson 184) and which needs Windows. The flow lessons note that VBA usually runs faster over a long sheet, while a flow shows its logic step by step on screen. Office Scripts and Python sit outside the course; these three cover the weekly cycle between them.
The VBA editor looks like a programmer's tool: what does the first stretch of the coding lessons ask of a supply chain analyst?
Curiosity more than experience, because The Complete Excel Course with AI Integration reaches code through the recorder. By the time the editor opens in Lesson 141, you have recorded macros of your own, so the first code you read is code Excel wrote for your own clicks; the lesson tours the Project Explorer, the modules and the code window, and shows three ways in. Lesson 142 covers macro security and the Enable Content bar, then fixes a missing End With so a compile error stops looking frightening. Lesson 143 writes a first line that points at the Data sheet through a variable, explained as a nickname for a long contact name, and Lesson 144 adds declared variables, comments and a message box. Later, Lesson 148 has you draft parts of the macro in Claude or ChatGPT, then put their mistakes right, so AI speeds you up without doing your thinking for you.
If a week's extract arrives with its sheet renamed, will the check crash halfway through?
It stops cleanly and tells you why, because The Complete Excel Course with AI Integration builds the master macro to fail politely. RunFullValidation in Lesson 152 starts with On Error GoTo ErrHandler, so when something unexpected happens, such as the code looking for a Data sheet that is no longer called Data, the run jumps to a handler that switches screen updating back on and shows the error's description instead of crashing mid-run. The cause is easy to find once you know where the code looks: Lesson 143 points every routine at its sheet by name, and Lesson 144 checks that name in the editor before running. In practice, paste each extract onto a sheet whose name never changes, and keep the handler for the surprises. Screen updating is off during the run to speed it up, which is exactly why the handler's tidy exit matters.
A former colleague left a macro that builds the weekly shortage list: how do I find out what each part does before I change it?
By reading it in the editor and watching it run, two skills The Complete Excel Course with AI Integration teaches before you write much code yourself. Lesson 141 opens the VBA editor, where the Project Explorer shows every module and the drop-down above the code window lists each macro, so an inherited routine stops being a black box. Lesson 144 and Lesson 145 explain what you will meet inside: Subs that act, Functions that hand back a result, declared variables and their types. Lesson 151 lets you watch the code work with Debug.Print, sending each row number and the value it reads to the Immediate window without touching the sheet. Work on a copy, keep it in the macro-enabled format (Lesson 140), and change one routine at a time, running it again after each change. Within a few evenings the shortage list is yours to maintain rather than a file everyone is afraid to open.
Can shortages show in one colour and missing master data in another, so planners see at a glance which is which?
Yes: each check sets its own fill, and The Complete Excel Course with AI Integration teaches the colour code itself. In Lesson 149, Interior.Color with RGB paints a cell by mixing red, green and blue on a scale up to 255, the lesson's soft warning red being one such mix, and the same line copied into a second check, with another column and another mix, gives that check a colour of its own. So a shortage can turn amber while a missing lead time turns red, with the Flag column spelling out which rule fired (Lesson 148). Keep the lesson's own warning in mind: change the column letter when you copy the line, or the wrong column lights up. Lesson 146 clears the Flag column's old messages and fills before each run; extend the same clearing to the columns you colour, and last week's marks never mix with this week's.
How soon could a macro be checking the open-order report I send to buyers each week?
Within 1 hour 16 minutes of lessons, and a useful first version long before the end. The 17 lessons on this page are the whole FormatWizard section of The Complete Excel Course with AI Integration, and the recorded half pays off first: by Lesson 140 a formatting macro runs from a button and is saved safely in a macro-enabled workbook. The written check grows lesson by lesson from Lesson 143, and by Lesson 152 one master macro clears old flags, checks every line for gaps and non-numbers and reports any error. Rebuild each step on a copy of your own open-order report as you go, with the starter workbook and the completed .xlsm beside you to compare. The lessons are shown on Windows with Windows shortcuts; on a Mac the screens differ slightly. Stuck on your own report? The instructor support plan brings the instructor's answer in writing.
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 supply chain analysts
- Lookups for supply chain analysts
- PivotTables for supply chain analysts
- Charts for supply chain analysts
- Dashboards for supply chain analysts
- Conditional formatting for supply chain
- Data cleaning for supply chain analysts
- Data validation for supply chain
- Excel tables for supply chain analysts
- Text functions for supply chain analysts
- Date functions for supply chain analysts
- Dynamic arrays for supply chain analysts
- Power Query for supply chain analysts
- Power Pivot and DAX for supply chain
- Power Automate for supply chain analysts
- Copilot for supply chain analysts
- ChatGPT for supply chain analysts
- Claude in Excel for supply chain