The Complete Excel Course with AI Integration
Excel macros and VBA for quality engineers
An inspection record is let down by its weakest cell: a blank reading, a word typed where a measurement belongs, a format redone by hand every shift. The Complete Excel Course with AI Integration hands that work to macros and VBA on FormatWizard, an industry-standard project, in the order a quality engineer meets it: the formatting recorded, code read, readings looped through, faults flagged and coloured, then one master check.
Taught by Sagnik Bhattacharya and Virginia Thorn
What you will be able to do
At work, you will be able to:
- Record the formatting every shift's inspection export needs, replay it from a shortcut or a toolbar button, and save it in a macro-enabled workbook so the code survives.
- Make a recording follow the cursor with relative references, so one keystroke marks whichever lot or sample row is selected.
- Move confidently through the VBA editor and read inherited code: modules, the worksheet a routine works on, variables declared under Option Explicit, and a home-made function that locates the bottom of the data.
- Loop through every row of an inspection record and flag missing readings, gauge IDs or inspector names, writing each reason into a flag column and colouring the cell with RGB.
- Catch words, notes and stray characters typed into a measurement column with IsNumeric, before an average or a pass rate is worked out from it.
- Clear the last run's flags and fills before each check, and watch what the code reads with Debug.Print before it writes a thing.
- Run every check from one master macro, with screen updating off for speed and an error handler that reports a fault in a message.
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 to check a sales sheet, it becomes a quality engineer's sign-off check: a starter workbook that ends as a macro-enabled tool which clears old flags, finds blanks, words in number columns and other faults, writes the reason beside each row and colours the cell, all from one button.
-
Project 13
AutoFlow
The weekly report routine, run by a flow instead of by you.
A Power Automate Desktop project on a weekly sales workbook, and it needs Windows. Set beside FormatWizard it shows which jobs suit a flow, opening, reading, writing and closing files from a shortcut, and which suit a macro, testing thousands of rows inside the workbook.
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 a worksheet holds no fears and an IF formula comes easily: the section assumes no code at all and builds FormatWizard from its first recording. Never opened Excel before? The course starts at Lesson 1; take the IF and AND lessons from Lesson 29 before the coding. Already recording macros? Go to Lesson 141 for the editor, or straight to Lesson 146, where the checks themselves begin.
17 of 186 lessons · 1 h 16 min
14 VBA and macros in Excel: FormatWizard The shift's formatting handed to the recorder: the FormatWizard brief, a first macro recorded on a sales sheet with its own name and letter shortcut, relative references that let it act on the selected row, Developer tab and toolbar buttons for running it, and the .xlsm file type that keeps the code. An inspection export's routine formatting is automated here before any code is typed.
- 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 Reading and writing code: the editor's panes and the ways in and out, macro security and when to enable content, a routine pointed at its worksheet by name, variables declared under Option Explicit, Sub set against Function, and GetLastUsedRow, which tells every later check where an inspection record of any length stops.
- 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 sign-off checks themselves, written for sales records and aimed here at readings: last run's flags and fills wiped, a loop that tests every row for a missing value, a flag that strings each row's faults together, light red fills mixed with RGB, and IsNumeric marking any entry in a number column that cannot be read as one.
- 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 before trust: Debug.Print, its output read in the Immediate window, reveals which cells a routine reads without touching the sheet, and RunFullValidation calls every check in order, quickly, with an error handler that names a fault instead of halting.
- 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.
What will Excel macros and VBA do for a quality engineer between the shift's export and the sign-off?
Format the export and check every record before it is signed, both at a click, and The Complete Excel Course with AI Integration from Coding Liquids builds the two into FormatWizard, an industry-standard project designed after talking with people from many different industries. You begin by recording the formatting each shift redoes, replayed from a key or a toolbar button (Lesson 137 to Lesson 139), then write VBA that walks down every row, flags what is missing, marks anything in a number column that is not one, colours each fault and runs the lot from one master macro with an error handler (Lesson 152). The lessons check a sales sheet; an inspection record has the same kind of columns, so the code is pointed at readings, gauge IDs and inspector names instead, while control charts and capability studies stay outside it. The 17 lessons here take 1 hour 16 minutes, with starter and finished files to compare against.
Each shift's inspection export needs the same headers, column widths and number formats: can I record that once and replay it?
Yes: the recorder learns the routine once and every shift gets it back in a keystroke. In The Complete Excel Course with AI Integration, Lesson 137 turns a run of clicks into a named macro with its own letter key, and Lesson 138 shows the switch that matters most for inspection work: recorded relative to the starting cell, the steps land on whichever lot or sample line is selected rather than on one fixed row. Headers, widths and number formats for a CMM or receiving export make a natural first recording, since they never change between shifts. Kept in the hidden personal macro workbook that Lesson 137 mentions, the macro is on hand in every export Excel opens on that PC; Lesson 139 adds a toolbar icon for colleagues who prefer clicking, and Lesson 140 explains why the file must be saved as .xlsm. Try it on yesterday's export first, since Ctrl+Z will not take a macro back.
A recorded macro can format the rejected rows, but can it decide which rows are rejected?
That decision is what VBA adds, and The Complete Excel Course with AI Integration shows the gap plainly. Lesson 142 points out that the recorded code formats the selected row without ever checking that its amount is negative: a recorder replays clicks, it does not judge. The VBA lessons supply the judgement. Lesson 146 uses If statements to act only when a condition holds, Lesson 147 puts a test inside For Next so it visits every row, and Lesson 148 collects each row's failures into one message. On an inspection sheet, that is the difference between a macro that colours row twelve because you clicked it and one that finds every rejected row, wherever it sits, and marks each with its reason. Recording still earns its place for fixed formatting; the checking belongs to code you write and can read back.
Operators write OK, a tick or see note where a measured value belongs: will the macro find those cells?
Yes: that is the job IsNumeric does in The Complete Excel Course with AI Integration. Lesson 150 loops down a number column and asks of each entry whether it 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 and its flag cell light red and writes that the entry is invalid. The lesson runs it on the per-unit figure of a sales sheet; aimed at a measurement column, it catches every OK, tick or see note an operator typed where a reading belongs, before any average or pass rate is worked out from that column. Empty cells are a separate test: the missing-value loop of Lesson 147 trims each cell first, so a cell holding only spaces still counts as empty. Between the two checks, every entry ends up as a usable number or a flagged row.
Can the macro flag readings outside their upper and lower limits, as well as blanks and words?
Yes: a limit test slots into the loop the course already builds, and the reasons land beside each row. The Complete Excel Course with AI Integration teaches the pieces in order: a For Next loop visiting every row (Lesson 147), If and Else tests adding a message to a row's flag for each fault found (Lesson 148), and RGB fills that colour the offending cell (Lesson 149). The lessons test for missing regions and salespeople; a tolerance check is the same If with a comparison in it, the reading set against the lower limit and the upper limit, writing out of tolerance to the flag and colouring the cell. Hold the limits in cells rather than typing them into the code, so a drawing revision changes a cell, not the macro. Conditional formatting can colour the same failure; the macro adds the written reason, kept on the sheet for whoever signs it off.
At final inspection sign-off, what does one click of the finished macro do to the record?
It audits the whole sheet in one pass and leaves its findings on it. The master routine of The Complete Excel Course with AI Integration, RunFullValidation in Lesson 152, calls the separate checks in order. First the previous run's flags and fills are cleared (Lesson 146), so a corrected reading does not keep yesterday's red. Then every row is tested for missing values, each fault is written into the flag column with a pipe between messages and its cell turned light red, and entries no sum could use are marked invalid, added to the flag rather than written over it. Screen updating is switched off so the run is quick, and if anything fails, an error handler restores the screen and reports the fault in a message instead of stopping in the code. GetLastUsedRow (Lesson 145) finds where the data ends, so a short lot and a full shift are checked the same way.
Inspectors on the floor will run the check: what do they need, and do they ever see the code?
A button and the macro-enabled file, and the code never needs opening. The Complete Excel Course with AI Integration sets that up in Lesson 139, which adds the Developer tab and places a macro on the Quick Access Toolbar with an icon of its own, and in Lesson 140, which saves the workbook as .xlsm so the code travels with the data. When such a file opens, Excel shows a yellow bar that holds the macros back; Lesson 142 explains Enable Content and the rule behind it, to enable only files from a source you trust, which is the line worth adding to the work instruction. Because the check wipes its old flags first and reports any error in a plain message, an inspector can run it after every correction without harming the sheet, and the editor stays closed throughout.
Our SPC and inspection templates run on macros written years ago by someone who has left: will I be able to read and fix them?
Yes, and looking after workbooks like those is one of the best reasons a quality engineer has to learn VBA. The Complete Excel Course with AI Integration teaches the reading before the writing. Lesson 141 tours the editor: the Project Explorer and its modules, the code window, the drop-down that moves between macros, and Alt+F11 to get in and out. Lesson 142 covers macro security, a compile error put right and macros moved between modules, and Lesson 143 shows how code names the workbook and sheet it works on, the first thing to find in someone else's macro. Variables, Option Explicit and how a Sub differs from a Function follow in Lesson 144, and Lesson 151 prints what the code reads to the Immediate window, so an old routine can be watched before it is touched. SPC itself is not taught; the VBA wrapped round it is.
Could ChatGPT write the macro that judges readings against tolerance, and how would I prove its logic before parts are accepted on it?
It can draft one, and The Complete Excel Course with AI Integration trains you to be the person who checks it. In Lesson 148, once the two-check loop is built, learners hand parts of the macro to Claude or ChatGPT, each in its own window, and then put right what comes back, so the habit of reading AI code is formed on a real routine. The checking tools come from the same section: Option Explicit (Lesson 144) stops a mistyped variable passing silently, Debug.Print (Lesson 151) shows which cells the code reads before it writes a flag, and the error handler (Lesson 152) reports a fault in plain words. For a tolerance check, feed it readings whose answer you already know: one well inside, one exactly on each limit and one just outside. A comparison written one way where the procedure means the other decides every reading on a limit, and only a test like that exposes it.
A CMM file runs to thousands of rows: will a macro or a Power Automate flow check it faster?
The macro, and The Complete Excel Course with AI Integration says so in its own words while teaching both. FormatWizard's checks run inside the workbook, and Lesson 152 switches screen updating off for the run, so thousands of readings are tested in moments. The Power Automate Ninja Challenge in Lesson 185 reads, tests and writes rows one at a time and stops at row 200 for the demonstration, because a desktop flow takes its time over a sheet of more than a thousand rows; the lesson itself notes that a VBA macro would usually be faster. The flow earns its place elsewhere: its logic is laid out visually, readable and auditable without code, and it opens, reads, writes, saves and closes a workbook from a desktop shortcut. So the CMM check is a macro's job, and the routine around it can be a flow's. The Power Automate lessons need Windows.
My pass or fail formulas already use IF and AND: how much of that logic carries into VBA?
Most of it, which gives a quality engineer a head start on most beginners. The Complete Excel Course with AI Integration teaches VBA's If, Then and Else in Lesson 146 and Lesson 148, and the thinking is the one behind an IF formula: a condition, what to do when it holds, what to do when it does not. What changes is where the test runs. A formula sits in each cell and is filled down; in VBA a For Next loop (Lesson 147) carries one test down every row, its counter stepping through the record line by line. Variables (Lesson 144) hold values the way a fixed cell holds a limit, and a function such as GetLastUsedRow (Lesson 145) hands an answer back to the routine that called it, much as a worksheet function returns a value to a cell. The new parts are vocabulary, and the section brings them in a lesson at a time.
Between parts, can a macro clear the readings and the red cells but leave the limits and headings alone?
Yes: the clean-up routine of The Complete Excel Course with AI Integration is exactly that kind of targeted reset. Lesson 146 builds a macro that locates the last row in use, stops with a warning if the sheet holds only headings, then clears the contents of one column range and removes its fill colour, leaving every other column untouched. FormatWizard uses it to empty the flag column before each check. Point the same range at the reading columns of an inspection form and the macro wipes the last part's measurements and their red cells while the nominal values, limits, part number and headings stay exactly where they are. Because the range ends at the last used row, it adapts to a form of any length. Put it on a toolbar button (Lesson 139) and the form is ready for the next part in one click.
Which lesson gives me a first useful macro, and when is the full sign-off check finished?
The first pays off in a single sitting, and the full check arrives as the section closes. The Complete Excel Course with AI Integration has a recorded formatting macro running from a shortcut by Lesson 137, following whichever row you start from by Lesson 138, and sitting on a toolbar button, saved as .xlsm, by Lesson 140: the shift export's formatting can be handed over that day. The coding half builds up step by step: a loop that flags every blank by Lesson 147, a flag listing every fault of a row and a coloured cell by Lesson 149, a test for words and stray characters in number columns by Lesson 150, and the single sign-off routine with its error handler by Lesson 152. All of it takes 1 hour 16 minutes, and lifetime access keeps the code to hand when the next inherited template needs changing.
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
- Excel formulas for quality engineers
- Lookups for quality engineers
- PivotTables for quality engineers
- Excel charts for quality engineers
- Excel dashboards for quality engineers
- Conditional formatting for quality
- Data cleaning for quality engineers
- Data validation for quality engineers
- Excel tables for quality engineers
- Text functions for quality engineers
- Date functions for quality engineers
- Dynamic arrays for quality engineers
- Power Query for quality engineers
- Power Pivot & DAX for quality engineers
- Power Automate for quality engineers
- Copilot for quality engineers
- ChatGPT for quality engineers
- Claude in Excel for quality engineers
Macros and VBA for other jobs
- Macros and VBA for quantity surveyors
- Macros and VBA for civil engineers
- Macros and VBA for construction managers
- Macros and VBA for health and safety
- Macros and VBA for document controllers
- Macros and VBA for production managers
- Macros and VBA for M&E engineers
- Macros and VBA for industrial engineers
- Macros and VBA for every job