The Complete Excel Course with AI Integration
Excel macros and VBA for industrial engineers
Every shift leaves a log to tidy and check before an industrial engineer can trust one average from it: blank station codes, notes typed where readings belong, old highlights still showing. The Complete Excel Course with AI Integration teaches the macros and VBA that take that routine over, on FormatWizard, an industry-standard project, and this page lists its whole VBA section, from the first recorded macro to one validation run 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 a macro once for the formatting every daily MES or downtime export needs, and run it from a shortcut key or a button on the Quick Access Toolbar.
- Choose absolute or relative recording, so a macro marks a fixed block of a report or whichever station row the cursor sits on.
- Write VBA that finds the last row of a log that grows every shift, with a reusable GetLastUsedRow function.
- Loop through every row with For Next and If to flag records missing a machine, a station or a cause code, writing the reason into a flag column.
- Colour suspect cells with Interior.Color and RGB, and use IsNumeric to flag entries in a number column that are not numbers at all, such as N/A or a note typed among cycle times.
- Clear old flags before each run, test code with Debug.Print in the Immediate window, and run every check from one subroutine with an error handler.
- Save the tool as a macro-enabled workbook that supervisors on other shifts can run with one click.
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 several thousand rows, it hands an industrial engineer a ready pattern for any shift or study log: clear yesterday's flags, walk every row, write the reason for each problem beside it and colour the cell, all from one master routine.
-
Project 13
AutoFlow
The weekly report routine, run by a flow instead of by you.
Built around a sales reporting routine, it shows automation from outside the workbook: flows that open Excel, read and write cells, loop over rows and branch on a Yes or No, the route for a job that spans files and apps rather than one sheet.
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 formulas are like: the section assumes no code and builds FormatWizard upward from a recorded macro. If Excel itself is new, take Lesson 1 onward first, so tables, rows and formatting are familiar. Already recording macros? Begin at Lesson 141, where the code starts. Engineers who have programmed before can move briskly from Lesson 143 to the loops of Lesson 147.
17 of 186 lessons · 1 h 16 min
14 VBA and macros in Excel: FormatWizard Macros before code: what a macro and VBA are, a first macro recorded with absolute references, a second with relative references that follows the cursor, the Developer tab with a button in the Quick Access Toolbar, and the XLSM format that keeps the code. The data is a sales sheet; any export with a fixed layout records the same way.
- 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 VBA editor and its modules, macro security and trust settings, a first line that points VBA at a named worksheet, variables declared under Option Explicit, a Sub set against a Function, and GetLastUsedRow, which finds where a growing log 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 Checks that suit any production log, built on the sales sheet: old flags and fills cleared before each run, a For Next loop that flags a blank key column, two checks joined into one flag message, empty cells coloured with RGB, and IsNumeric marking entries in a number column that are not numbers.
- 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 assembly: Debug.Print and the Immediate window to see what the code reads before it writes anything, then RunFullValidation, which calls 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.
Plant IT approves new software slowly: can an industrial engineer automate shift reports and study checks with Excel macros and VBA instead, and where is that taught?
Yes: VBA lives inside the Excel already on the plant's PCs, and The Complete Excel Course with AI Integration from Coding Liquids teaches it from a first recording to a complete checking tool on FormatWizard, an industry-standard project designed after talking with people from many different industries. You record macros that repeat a formatting job with one click, then write VBA that walks every row of a long sheet, flags blanks and entries that are not numbers, colours the cells and runs every check from one routine with an error handler. Shift logs, downtime registers and time study sheets are exactly the kind of file that pattern suits. For an engineer's own logs, the 17 lessons on this page, 1 hour 16 minutes of video, cover the whole VBA section, and Lesson 142 explains the trust settings that decide whether a workbook's code may run.
Operators sometimes key a note such as 'see log' or 'N/A' into the good-parts column: can VBA flag those rows before the shift report goes out?
Yes, and The Complete Excel Course with AI Integration builds exactly that check in Lesson 150. A loop runs IsNumeric down a number column, the unit figure in the course's sales sheet, and for any entry that cannot be treated as a number it colours the cell and the flag column light red and writes 'units invalid' beside it. Point the same loop at good parts, scrap or cycle time and it catches a word, a note like N/A or a letter O keyed in place of a zero, before an average or a total quietly goes wrong. A blank cell is a different fault, caught by the missing-value pattern of Lesson 147 and Lesson 148. The message says invalid rather than missing, so whoever corrects the row knows which kind of fault it is, and every row of the log is checked in a single pass.
Can one click give every day's MES export the same formatting without me redoing it?
Yes: a recorded macro does it, and The Complete Excel Course with AI Integration teaches recording before any code is written. In Lesson 137 you record a macro while formatting a row, name it, give it a shortcut key and store it in the workbook; Lesson 139 adds the Developer tab and puts the macro on a button in the Quick Access Toolbar; Lesson 140 saves the file as a macro-enabled workbook, because an ordinary workbook strips the code out. The recording lesson also explains the Personal Macro Workbook, which keeps a macro available whenever Excel opens on your computer, so the clean-up follows you from one export to the next. Record the steps your daily MES or downtime export always needs and that routine shrinks to a keystroke, done the same way on a busy morning as on a quiet one.
The rows that need marking change every shift: should the macro be recorded with absolute or relative references?
Relative, for rows that move, and The Complete Excel Course with AI Integration shows the difference on the same sheet so the choice is obvious. Lesson 137 records with absolute references: the macro always formats the very row it was recorded on, whatever cell you start from. Lesson 138 switches on Use Relative References before recording, so Excel follows your movement from the starting cell instead, and the macro formats whichever row you begin on; the real test is running it on a different row from the one recorded. For an industrial engineer that is the macro for marking a station over takt, a reading to re-time or a stoppage to review, wherever it falls in today's log: click into the row, press the shortcut, move on. Absolute recording still suits the fixed parts of a report, such as a header block that never moves.
My production log gains rows every shift: how does the code know where the data stops?
It asks, with a function you write once and reuse in every macro after it. In Lesson 145, The Complete Excel Course with AI Integration builds GetLastUsedRow: if the sheet is empty it returns zero and stops, and otherwise it uses Find to search upwards from the bottom of the sheet for the last cell holding anything, then hands that row number back. Run it and it reports the last used row; add one row and run it again, and the answer moves down by one. The lesson before it, Lesson 144, sets up the Sub that calls it, with variables declared under Option Explicit and the result shown in a message box. Every check later in the section loops from the first data row to that number, so a log of today's length or next month's is covered with no range to edit by hand.
Can VBA flag every stoppage record that has no machine or no cause code?
Yes, in a single pass of the register, and the method The Complete Excel Course with AI Integration teaches grows one lesson at a time. On the course's sales sheet, region and salesperson stand in for your machine number and cause code. Lesson 147 gives a For Next counter the job of visiting each record and noting 'Region missing' wherever that field is blank, a field of spaces included. Lesson 148 tests the second field inside the same pass and gathers both faults into one note. Lesson 149 shades the empty field itself with Interior.Color. On a downtime register the result is concrete: each stoppage lacking its machine or its cause is named and shaded, a filter on the note column lists them, and the crew that logged them receives a short list of gaps to fill. Availability figures drawn from that register then rest on complete records.
If I correct the log and run the check again, will yesterday's flags still be there to mislead me?
They are cleared first, and The Complete Excel Course with AI Integration gives that reset a lesson of its own, Lesson 146. The cleanup macro empties the flag column's messages and removes its fill colours from the first data row down to the last used row, and it stops with a warning if the sheet holds nothing but headers. It reuses GetLastUsedRow, made public so other modules can call it. In the complete tool of Lesson 152 this routine runs before every check, so each run starts from a clean column and every flag on the sheet belongs to today's data. On a shift log that matters more than it sounds: a stale 'cause missing' left on a row someone has since corrected sends a supervisor chasing a problem that no longer exists. The lesson also tests the reset itself, typing a note and a fill into a flag cell and running it again.
Can the checks run as one routine, and what happens if something fails halfway through a long log?
Yes: The Complete Excel Course with AI Integration closes its VBA section with a master routine, RunFullValidation in Lesson 152, that calls the reset, the blank-field checks and the number check in sequence. While it works, Excel stops redrawing the display, so even a long log is finished quickly, and On Error GoTo sends any failure to a handler that puts the display back and shows what went wrong, rather than stopping silently partway down. A last repair in that lesson keeps the notes honest: when two checks report on one record, the later one adds its text to the earlier note instead of overwriting it. For the engineer who opens the shift log first thing, that is one click from raw records to a sheet where every incomplete or suspect row carries all of its reasons, and nothing about the run is left to memory.
What stops a half-finished macro from scrambling a production log while I am still testing it?
Debug.Print, the Immediate window and the order of work The Complete Excel Course with AI Integration teaches. In Lesson 151, one routine prints its counter on each pass and a second prints every row number with the value it reads from the first column, all into the Immediate window (Ctrl+G) and none onto the sheet. You confirm the code reads the right cells in the right order before a single flag is written, which stops one mistake spreading over hundreds of rows. Option Explicit, from Lesson 144, catches a mistyped variable before the code runs, and the compile errors met along the way, a missing End With and a missing declaration, are fixed on screen. Since Ctrl+Z cannot undo a macro, test on a copy of the log, just as the course builds on its practice file before anything real.
If ChatGPT or Claude drafts the loop for my downtime check, can I tell whether its VBA is right?
Yes, because The Complete Excel Course with AI Integration teaches you to read the code before you trust it, and it puts AI drafting to work inside the VBA lessons. In Lesson 148, after the two-check loop is built, learners write parts of the macro with Claude or ChatGPT, each in its own window, and then correct what comes back. The rest of the section is what makes that safe: you know what Option Explicit, a For Next loop, an If block and a flag message should look like, Debug.Print shows what the code really reads (Lesson 151), and an error handler reports a failure instead of hiding it (Lesson 152). An AI draft can name the wrong column or wipe a flag it should keep; an engineer who has built FormatWizard spots that in the code and in the flags on the sheet.
Our site is adopting Power Automate: does a macro still have a place in my workbooks?
Yes, a clear one, and The Complete Excel Course with AI Integration teaches both so you can choose per job. Inside a workbook, a VBA macro is the quick way to check and mark thousands of rows: FormatWizard's validation runs down an entire sales sheet in one go. Power Automate Desktop works from outside, opening the workbook, reading and writing cells, branching on a Yes or No and looping over rows, and the AutoFlow challenge notes that a macro would usually finish a long row-by-row job faster, while a flow shows its logic visually without code (Lesson 185). So the shift-log check suits VBA, and a routine that opens the workbook, asks a supervisor to approve and writes the answer back suits a flow. The Power Automate lessons need Excel on Windows; Office Scripts, a third route, is not taught.
Will supervisors on other shifts be able to run my macro without opening the code?
Yes: a button and a macro-enabled file are all they need, and The Complete Excel Course with AI Integration sets up both. Lesson 139 puts a macro on a button in the Quick Access Toolbar, so anyone can run it with one click, and Lesson 140 saves the workbook as XLSM, the format that keeps the code with the data. Lesson 142 covers the other side: the yellow bar that disables macros in a file Excel does not yet trust, and Enable Content, to be clicked only for a file you trust. As Lesson 136 puts it, a macro runs the same way every time, for you or for a colleague, which is exactly what a shared shift check needs: the same rules on every shift, whoever presses the button. The code stays in the VBA editor for whoever looks after the tool.
I wrote some MATLAB or Python at university: how quickly will VBA come back to me?
Quickly, because the ideas carry over and The Complete Excel Course with AI Integration spends its time on the part that is new, Excel itself. Variables and data types under Option Explicit (Lesson 144), the split between a Sub that acts and a Function that returns a value (Lesson 145), For Next loops (Lesson 147), If and Else (Lesson 148), print debugging with Debug.Print (Lesson 151) and error handling (Lesson 152) will all look familiar. What a programmer has to learn is how VBA talks to a workbook: ThisWorkbook and a worksheet by name (Lesson 143), cells addressed by row and column letter, Interior.Color with RGB (Lesson 149). The section runs to about 1 hour 16 minutes, and with the instructor support plan a question about the code for your own log goes to the instructor, who answers 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