The Complete Excel Course with AI Integration

Excel macros and VBA for production managers

The end of every shift brings the same Excel chores: lay out the shift report, check what operators typed into the log and mark the rows to chase before the morning meeting. The Complete Excel Course with AI Integration hands both jobs to macros on FormatWizard, an industry-standard project, and this page picks out its lessons for a production manager: recorded macros for the layout, then VBA that checks every row and flags what is wrong.

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 shift report's layout once, with relative references where it must follow the selected row, and run it from a button on the Quick Access Toolbar.
  • Save the shift workbook as a macro-enabled XLSM file, open it safely with Enable Content, and keep a recording to hand in every file through the Personal Macro Workbook.
  • Read and edit recorded code in the VBA editor, and write Subs and Functions of your own with declared variables and Option Explicit.
  • Loop down a shift or downtime log with For Next and flag every row with a missing line code, product or stoppage reason, with several messages in one cell when a row has more than one fault.
  • Colour the cells at fault with Interior.Color and RGB, and catch a word or a note typed into a count column with IsNumeric.
  • Find the last row of a log that grows every shift with a reusable function, and test a loop with Debug.Print before it writes a single flag.
  • Run every check from one master macro with screen updating off and an error handler that reports what went wrong instead of stopping dead.

Projects

What you will build.

The course has 14 industry-standard projects. These three matter most here.

  • Project 11

    FormatWizard

    One click that checks a whole sheet for you.

    Built on a sheet of several thousand sales orders, it grows from one recorded formatting macro into a full checking tool: last row found by a function, old flags cleared, reasons written beside faulty rows, cells coloured and errors reported. Swap its column letters and messages and it checks a shift log.

  • Project 12

    SalesFusion

    A sales report that refreshes itself from a folder of files.

    Built to combine a folder of messy sales files, it handles the job a consolidation macro is often written for: every line's daily file stacked into one table by From Folder and cleaned by the same steps, so the checking macro has one log to run down.

  • Project 13

    AutoFlow

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

    Built to run a weekly sales report routine, it shows automation from outside the workbook: Power Automate Desktop flows, on Windows, that open Excel, read the rows, loop, test with If and write a flag back, the shift-log check driven by a flow rather than a button.

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 formulas, sorting and formatting already come easily: the recorded macros come first, and the VBA builds on them one idea at a time. New to Excel? Begin at Lesson 1, since a macro can only repeat what you already know how to do by hand. Recording macros already? Go to Lesson 141 for the editor, or straight to Lesson 146, where the checking routines for a log begin.

17 of 186 lessons · 1 h 16 min

14 VBA and macros in Excel: FormatWizard 5 of 17 lessons · 19 min The recorder first: macros defined and the FormatWizard tool introduced, one formatting macro recorded with fixed references and once more with relative ones, the Developer tab and a toolbar button, and the XLSM file type that holds on to the code. For a production manager this is the shift report's layout, done once and replayed by whoever is on shift.
  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 code: the VBA editor opened with Alt+F11, macro security and Enable Content, a first line that names the worksheet, variables, data types and Option Explicit, and a Sub that acts set against a Function that answers, ending with GetLastUsedRow, which finds the end of a log however long it has grown.
  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 checking macro a shift log needs: old flags and fills cleared, a For Next loop marking blanks after Trim, two checks joined in one flag message, soft red highlights with RGB, IsNumeric for entries that are not numbers, Debug.Print to watch the loop, and one master routine with an error handler. The lessons check sales orders; a shift or downtime log takes the same structure.
  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.

How would Excel macros and VBA change a production manager's end-of-shift paperwork?

They take the layout and the checks off your hands, and The Complete Excel Course with AI Integration from Coding Liquids teaches both on FormatWizard, an industry-standard project designed after talking with people from many different industries. Recorded macros take the layout: the bold headers, fills and number formats you give the shift report every day, replayed from a button. Written VBA takes the checks: a loop down every row of the log that writes a reason beside each row with a missing line or reason code, colours the cell at fault, flags a word typed where a count belongs and reports a problem instead of crashing. The 17 lessons picked out here, 1 hour 16 minutes of video, run from your first recording to one master macro that checks a whole sheet in a single run. Exporting to PDF and sending email are not among the lessons; the report and its checks, the daily grind, are.

The shift report has to be ready at handover: can the outgoing supervisor produce it with one click?

Yes: record the layout once and put it on a button, and The Complete Excel Course with AI Integration shows each step. Lesson 137 records a formatting macro, names it, gives it a Ctrl shortcut and stores it in the workbook; Lesson 139 switches on the Developer tab and adds the macro to the Quick Access Toolbar with an icon of its own, so the outgoing supervisor clicks once and never sees the code. A macro runs the same way for whoever presses it, which is the whole point at handover: every shift's report comes out in one house style. Lesson 140 saves the file as a macro-enabled workbook so the button still works tomorrow. Lay out one report while the recorder runs, the sort, the bold headers, the colour on the totals row, and the end-of-shift layout becomes a few seconds' work. The VBA lessons that follow add the checks to the same button.

My recorded macro keeps formatting yesterday's row of the log: how do I make it work on today's?

Switch on Use Relative References before recording, and the macro works from whichever cell you start in. The Complete Excel Course with AI Integration shows the difference on purpose. Lesson 137 records a macro with absolute references, and it formats the same fixed row every time it runs, which on a log that grows is always yesterday's row. Lesson 138 records it again with Use Relative References on, so Excel follows your movements from the starting cell instead of a fixed address, and the real test is a different row further down the sheet: one keystroke formats whichever row is selected. On a shift log, click today's first row, press the shortcut and the new rows take the layout. Lesson 142 adds a caution worth knowing: a recorded macro formats without checking anything, so a row is styled whether or not it deserves it. Checks need VBA, which the following lessons teach.

I recorded the shift layout, saved the workbook, and next morning the macro had gone: what happened?

The file was saved as an ordinary workbook, which strips every macro out, and The Complete Excel Course with AI Integration covers the fix in Lesson 140. A file holding code needs Save As the first time, with Excel Macro-Enabled Workbook picked as the file type; Excel warns when a file with code is saved the ordinary way, and a click past that warning keeps the data and loses the code. Save the shift workbook as XLSM and the recording stays with the sheet it formats. When the file opens next morning, its macros arrive switched off behind a yellow bar: Lesson 142 covers Enable Content and the trust settings, with the rule to enable content only for files you trust. And if the macro should be on hand in every workbook rather than one, Lesson 137 shows the Personal Macro Workbook, which keeps a recording available whenever Excel opens on that computer.

Which of my shift-report chores can the recorder learn by itself, and which need written VBA?

The layout can be recorded; anything that has to look at a value first needs VBA, and The Complete Excel Course with AI Integration teaches both in that order. The recorder learns what you do with the mouse and keyboard: bold headers, fills, number formats, a sort, a column width, all replayed from a button (Lesson 137 to Lesson 139). What it cannot learn is judgement: as Lesson 142 points out, the recorded code formats a row without checking that its amount really is negative. Checking a shift log means deciding row by row, is the line code there, is the reason filled in, is the count a number, and that takes a variable, an If statement and a loop, which the lessons from Lesson 143 build one at a time. The recorder is also the easiest way into the code: Lesson 141 opens a recorded macro in the VBA editor, so you read what Excel wrote for you.

Stoppages logged without a reason code wreck the downtime Pareto: can a macro catch them at the end of each shift?

Yes: a loop down the log can write Reason missing beside every stoppage that lacks one, and The Complete Excel Course with AI Integration builds that loop in Lesson 147. Its For Next loop moves a row counter from the first record to the last, tests each cell after Trim, so a cell holding only spaces still counts as empty, and writes a flag in the Flag column wherever the value is missing. Lesson 148 checks two columns in one pass and joins the messages with a pipe, so a stoppage with neither line nor reason gets both, and Lesson 149 colours the empty cells soft red so the supervisor sees them at a glance. Lesson 146 clears the previous run's flags and fills first, so each shift starts clean. Run it before the downtime Pareto is drawn and every stretch of lost time arrives with a cause to rank it under.

Operators sometimes write a note such as machine down where the good-units count belongs: will the macro find each one?

Yes, row by row, with the IsNumeric check that The Complete Excel Course with AI Integration builds in Lesson 150. The macro walks down a column that should hold only figures, asks of each entry whether it can be read as a number, and wherever the answer is no it shades that cell and its flag cell red and labels the row invalid. So machine down, a question mark or an operator's initials keyed into the good-units column surface at the end of the shift, on the very row where they sit, instead of vanishing from a SUMIFS total and leaving the line's output short in the morning meeting. In the lesson the column holds per-unit figures; aim it at good units, scrap or downtime and nothing else changes. Digits stored as text are a separate fault, handled elsewhere in the course: the COUNT beside COUNTA check of Lesson 35 and Power Query's data types in Lesson 158.

Can the macro flag every shift that finished below plan, not only the blanks?

Yes: the same If that tests for a blank can compare output with plan, and The Complete Excel Course with AI Integration gives you every part of it. The lessons' loops test whether a cell is empty (Lesson 147) and whether an entry is a number (Lesson 150); put a comparison of the output cell against the plan cell in place of either test and the macro writes Below plan in the Flag column and colours the shortfall with Interior.Color and RGB (Lesson 149). If all you want is the colour, conditional formatting gives it without code, as Lesson 82 shows with overdue tasks. The macro earns its place when the shortfall must be written into the log as a reason, beside the missing codes and invalid counts, by the same one-click run. Either way the shift that missed stands out before the meeting asks about it.

ChatGPT's macro worked on last week's log but stops short on this week's longer one: what went wrong?

The usual cause is a last row typed into the code as a fixed number, and The Complete Excel Course with AI Integration teaches the fix that finds the end of the log for itself. Lesson 145 builds GetLastUsedRow, a function that searches upwards from the bottom of the sheet for the last filled row, with a guard for an empty sheet, so every macro that calls it reaches the newest shift however long the log has grown. The same section has you write parts of a macro with Claude or ChatGPT, in their own window, and correct what comes back (Lesson 148), the habit that catches a fault like this. Before a drafted loop writes flags, Lesson 151 prints the rows it reads to the Immediate window with Debug.Print, so you see where it starts and where it stops. And Option Explicit, from Lesson 144, stops a mistyped variable name from failing silently.

FormatWizard checks sales orders: how much has to change before it checks a shift log?

Less than you might expect: the structure stays and the details change, and The Complete Excel Course with AI Integration builds that structure in FormatWizard. The macro points to its sheet by name (Lesson 143), finds the last row with a reusable function (Lesson 145), clears the old flags (Lesson 146), loops down the rows testing each one (Lesson 147 to Lesson 150) and runs it all from one master routine with an error handler (Lesson 152). For a shift log you change the sheet's name, the column letters the tests read and the messages they write: line missing in place of region missing, an invalid scrap count in place of an invalid per-unit figure. Because you build every module yourself and read each line, you know exactly which lines those are, and the finished workbook stays beside you to compare against.

Each line keeps its own daily workbook: can a macro gather them into one plant log?

The gathering is taught in The Complete Excel Course with AI Integration, and without a line of VBA: Power Query's From Folder does it in Lesson 166. Save each line's daily file into one folder and the query stacks every file into a single table, adds a column naming the file each row came from, and cleans each one with the same steps set once on a sample. Tomorrow's files join at the next refresh. That leaves the macro the job it does best: checking the combined log row by row for missing codes and invalid counts, and flagging and colouring what it finds. A VBA loop that opens workbooks one by one is a classic forum answer, and not one this course teaches; the folder query does the same work with nothing to maintain, as long as the files share one layout, which copies of one shift template normally do.

The MES and the ERP already produce reports: why would a plant still run macros in Excel?

Because the systems stop at the export, and the last stretch of every report is still done by hand in Excel. The MES gives the counts, but somebody lays out the shift report, checks what operators typed and colours what the meeting must see. The Complete Excel Course with AI Integration automates that stretch: recorded macros for the layout, and VBA for the checks, a loop that flags missing codes, catches words in number columns and reports errors instead of crashing. The same course teaches what people say is replacing macros, so you can choose for each job: Power Automate Desktop flows that drive Excel from outside on Windows, in AutoFlow, and Copilot, ChatGPT and Claude, including drafting parts of a macro with an AI and correcting them (Lesson 148). VBA stays the tool that lives inside the workbook and runs the same check the same way on every shift.

I came up through the shop floor, not IT: will the VBA lessons lose me?

You need no IT background, because The Complete Excel Course with AI Integration starts from the recorder, where Excel writes the code for you while you work. Recording, running from a button and saving come first (Lesson 137 to Lesson 140); then Lesson 141 opens the editor with Alt+F11 and shows what the recording looks like as code. From there the lessons add one idea at a time: a variable that names the sheet, Option Explicit so a typo is caught, a Sub set against a Function, a loop that moves down the rows like a finger on a list. Longer routines are pasted in and read line by line rather than typed from memory. The shortcuts shown are the Windows ones, but the macro lessons do not need a Windows PC: on a Mac the screens differ slightly. FormatWizard's starter and finished files come with the course, so every step can be checked against a working answer.

A year of shift records sits on one sheet: will the full check take long to run?

It is built to run fast on long sheets, and The Complete Excel Course with AI Integration shows how. Lesson 152 turns screen updating off while the master macro calls each check, so Excel stops redrawing the sheet at every flag, and turns it back on at the end, even when an error interrupts the run, because the error handler restores it before reporting what went wrong. Lesson 145 finds the last row with a single search from the bottom rather than stepping through empty cells, so the loops run exactly as far as the data. FormatWizard's own sheet holds several thousand orders, a fair match for a plant's shift log over many months. Before a new check runs on the real log, Lesson 151 prints the first rows it reads with Debug.Print, a quick test that keeps one slip from being copied down every row of the year.

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.