The Complete Excel Course with AI Integration

Macros and VBA for mechanical & electrical engineers

Equipment schedules, BOM exports and logger files all need the same checks before they are issued: blank tags, missing ratings, readings that are not numbers. By eye, a long sheet hides the one cell that matters. The Complete Excel Course with AI Integration teaches mechanical and electrical engineers macros and VBA on FormatWizard, an industry-standard project, from the first recording through loops, flags and colour to debugging and one master macro.

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 a macro that lays out a test datasheet or schedule in one click, with relative references so it formats whichever row you start from.
  • Save calculation tools as macro-enabled .xlsm files, run them from a button or the Quick Access Toolbar, and open shared ones with the right trust settings.
  • Write VBA with Option Explicit, declared variables and a Function that finds the last used row, so a check reaches the end of any schedule or log.
  • Loop down an equipment schedule, BOM or cable list with For Next and If, flagging blank tags, ratings or sizes in a message column.
  • Flag entries in a logger export that are not numbers, such as OL, N/A or a dash, with IsNumeric, and colour them with RGB.
  • Watch what a macro reads with Debug.Print and the Immediate window before it writes a flag, and correct code that ChatGPT or Claude drafted.
  • Run every check from one master macro with screen updating off and an error handler that reports what went wrong.

Projects

What you will build.

The course has 14 industry-standard projects. This one matters most here.

  • Project 11

    FormatWizard

    One click that checks a whole sheet for you.

    Built to audit a sales sheet, it is the frame of an engineering checker: a loop down every row, flags for blanks and for entries that are not numbers written beside the row and coloured, last run's flags cleared first, and a master macro with an error handler over it all.

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 and IF checks are already second nature: FormatWizard opens with recording and moves into code one step at a time, so no programming background is assumed. New to Excel? Begin at Lesson 1, and take IF from Lesson 29 before the macros. Recording already and only after code? Go to Lesson 141 for the editor, or straight to Lesson 147, where the checking loops begin.

17 of 186 lessons · 1 h 16 min

14 VBA and macros in Excel: FormatWizard 5 of 17 lessons · 19 min Recording before coding: what a macro is and the FormatWizard goal, a first recorded macro with absolute references, relative recording that formats whichever row you start from, the Developer tab with a button and the Quick Access Toolbar, and saving as .xlsm so a calculation tool keeps its code.
  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 3 of 17 lessons · 13 min The VBA editor: Alt+F11 and the Project Explorer, modules, macro security and the Enable Content bar for files you trust, a compile error fixed, and the first line of code that points a variable at a worksheet by name, as any engineering tool must before it touches a cell.
  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
14 VBA and macros in Excel: FormatWizard 3 of 17 lessons · 15 min Variables and data types under Option Explicit, the difference between a Sub and a Function, GetLastUsedRow built with Find so a check always reaches the last row of a growing log, and a routine that clears last run's flags and colours before the next check.
  1. 144 VBA variables and data types Sub vs function for Excel beginners 6 min
  2. 145 VBA functions in Excel Build GetLastUsedRow with find and exit function 5 min
  3. 146 Clear old flags with VBA Reset messages and fill colours with if statements 5 min
14 VBA and macros in Excel: FormatWizard 4 of 17 lessons · 21 min The checks themselves: a For Next loop that flags blank values, If and Else building one message per row from several tests, RGB fills that light up the failing cell, and IsNumeric flagging entries in a number column that are not numbers. Built on sales columns, they map straight onto tags, ratings, cable sizes and readings.
  1. 147 For Next loop in VBA Flag missing region values in Excel 4 min
  2. 148 VBA If Else and loops Check missing sales data and build a FlagText message 5 min
  3. 149 Highlight cells with VBA Interior.Color and RGB for missing data 5 min
  4. 150 IsNumeric in VBA Validate unit price and amount data types in Excel 7 min
14 VBA and macros in Excel: FormatWizard 2 of 17 lessons · 8 min Debug.Print and the Immediate window to watch a loop read the right cells before it writes, then one master macro that runs every check in order, with screen updating off and an error handler that reports instead of crashing.
  1. 151 Debugging VBA for beginners Debug.Print and the Immediate window 5 min
  2. 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 do mechanical and electrical engineers put Excel macros and VBA to work on the sheets they issue every week?

To check and tidy schedules, exports and test sheets too long to go through by eye, and The Complete Excel Course with AI Integration from Coding Liquids teaches exactly that through FormatWizard, an industry-standard project designed after talking with people from many different industries. Its 17 lessons (1 hour 16 minutes) start with a recorded macro and finish with a validation tool in proper VBA: a loop down every row, flags for blank entries and for entries that are not numbers, written beside the row and coloured, old flags cleared before each run and one master macro with an error handler. The sheet it checks holds sales data, and the build fits an equipment schedule, a BOM export or a logger file just as well: change the column letters and messages, and the tool checks tags, ratings and readings instead. Starter and finished workbooks come with the course, so your code can be compared with a working version.

Can a macro check a panel schedule or equipment list for missing ratings, tags and cable sizes before it goes out for review?

Yes: that is the check FormatWizard builds, and The Complete Excel Course with AI Integration teaches every part of it. Lesson 147 loops down the sheet with For Next and flags each row whose region is blank, trimming first so a cell holding only spaces still counts as empty. Lesson 148 tests a second column in the same pass and builds a message per row, separated by pipes, so a circuit missing both its rating and its cable size shows both problems at once. Lesson 149 fills the offending cell light red with RGB. GetLastUsedRow from Lesson 145 sends the loop to the true last row however long the schedule grows, and Lesson 146 clears last run's flags and fills before each new check. Point the column letters at tag, rating and cable size, and a schedule of hundreds of lines is checked in the time it takes to click a button.

When a logger channel drops out, the export shows OL or dashes where readings should be: can a macro mark those cells for me?

Yes: Lesson 150 of The Complete Excel Course with AI Integration builds exactly that check. A For Next loop runs down a number column and asks IsNumeric of each cell; anything that cannot be read as a number, a word such as OL or N/A, a dash or a stray character, gets a light red fill and a message in the flag column, while true readings pass untouched. The lesson does it on the per-unit figure column of a sales sheet, and pointing it at a voltage, current or temperature channel means changing one column letter. Run it before a channel is charted or summarised and no entry of the wrong kind slips into a test report. Readings that arrive as numbers stored as text are a different fault, and the Power Query lessons fix those by giving each column its data type (Lesson 158).

Can a macro run down a commissioning sheet and mark every result outside its tolerance?

Yes, with the same parts The Complete Excel Course with AI Integration uses for its own checks. The loop comes from Lesson 147: For Next from the first data row to the last, one row per pass. The test is an If, as in Lesson 148, comparing each measured value with the minimum and maximum columns instead of asking whether a cell is blank. A failing row gets a message such as Over limit or Under limit added to its flag cell after a pipe, and Lesson 149 colours the measured cell with RGB. Running IsNumeric first (Lesson 150) means a note typed into the results column is flagged instead of compared. The lessons test for blanks and non-numbers on sales data; the tolerance test is the same If with a comparison inside, and the result is what every commissioning review wants: one click, every out-of-tolerance result in red.

Can I write my own VBA function for voltage drop or pipe pressure loss and call it like a built-in formula?

Yes, and The Complete Excel Course with AI Integration teaches the skeleton every such function shares. Lesson 144 sets out the difference between a Sub, which performs an action, and a Function, which hands a result back, with declared variables and data types under Option Explicit. Lesson 145 writes a real function, GetLastUsedRow, that takes a worksheet as its argument, works out an answer and returns it, with Exit Function for the empty case, and Lesson 146 makes it Public so other modules can call it. A voltage-drop function has the same frame: current, length and cable data as its arguments, your formula in the middle, the result assigned to the function's name. The lessons call their function from other macros; typing yours into a worksheet cell, as you would SUM, is a short step beyond them, and the engineering formula inside stays yours.

Can a macro read the inputs of a sizing sheet, run the calculation and write the results into an output block?

Yes: reading cells, holding values and writing results back are the moves The Complete Excel Course with AI Integration drills all through its VBA lessons. Lesson 143 points a variable at a worksheet by name, the first thing any tool must do. Lesson 144 declares the variables that hold your inputs, as Long, Integer or String, and Lesson 148 writes a value built in code into a chosen cell through Cells and Value. Branching on a result, such as writing Adequate or Undersized beside a check, is the If and Else of Lesson 146 and Lesson 148, and Lesson 152 wraps a whole run in an error handler that reports what went wrong instead of stopping dead. The lessons loop over rows with For Next; a loop that repeats until a calculation converges is not taught. Your sizing method sits in the middle, as the formula you already trust.

My calculation sheet already shows pass or fail with IF formulas: when is a macro the better tool?

When the check has to sweep a whole schedule on demand, and The Complete Excel Course with AI Integration teaches both tools so you choose each time. A formula such as IF with AND (Lesson 33) lives in its cell, recalculates as inputs change and suits a calculation sheet's own limits. A macro earns its place when the job is a sweep: every row of a long schedule or export, several tests per row, a message saying what is wrong, colour on the failing cell, last run's flags cleared and nothing left in the sheet but results. FormatWizard (Lesson 147 to Lesson 152) is built for exactly that sweep. Conditional formatting (Lesson 15) sits between the two: live colour, no message. Use each where it fits: formulas inside the calculation, colour for the reader, and a macro for the check before a document is issued.

ChatGPT wrote me a routine for a load schedule that runs but gives odd results: will the course teach me enough VBA to see why?

Yes, and The Complete Excel Course with AI Integration builds that exact skill into its VBA lessons. In Lesson 148 you write parts of the macro with Claude or ChatGPT, each in its own window, and then correct what comes back, so reading generated code critically is practised, not just promised. The tools for finding a fault are taught one by one: Option Explicit (Lesson 144) refuses a misspelt variable that would otherwise sit empty, Debug.Print and the Immediate window (Lesson 151) show what the loop actually reads row by row, and the message-building lesson shows a variable that is not emptied for each row carrying one row's result into the next. Each is a common way for code that runs to give wrong answers. After these lessons you can read the routine line by line, find the fault and fix it yourself.

I lay out every test datasheet the same way: can one recorded macro be ready in whichever workbook I open?

Yes, and recording it takes no code at all. The Complete Excel Course with AI Integration records a first macro in Lesson 137, named without spaces and given a Ctrl shortcut, and points out the Personal Macro Workbook, the hidden file that keeps a macro available whenever Excel opens on that computer, so a datasheet layout follows you from file to file. Lesson 138 switches on Use Relative References, so the macro works from whichever cell you start in rather than replaying one fixed row, and Lesson 139 puts it on a button in the Quick Access Toolbar. One caution the lessons make plain: Ctrl+Z cannot undo a macro, so try a new one on a copy. Lesson 142 then shows why code follows recording: the recorded macro formats a row without checking whether it should, which is exactly what the VBA lessons add.

Engineering calculation tools are passed round as .xlsm files: what does the course teach about saving, opening and trusting them?

Everything a tool's author and its users meet, and The Complete Excel Course with AI Integration covers it before any code is written. Lesson 140 shows why the first save of a workbook with macros needs Save As and the Excel Macro-Enabled Workbook type: a standard .xlsx strips every macro out. Lesson 142 opens such a file again, meets the yellow bar saying macros have been disabled, and sets the rule to live by: enable content only for files you trust. Lesson 139 gives users a button to press so they never need the editor, and Lesson 141 shows where the code lives, in modules, so a reviewer can read what a tool does before relying on it. For a calculation tool that circulates round a design office, those habits are what keep a useful macro from becoming a risky one.

I already script in MATLAB or Python: what will be new to me in Excel VBA?

Mostly Excel itself, and The Complete Excel Course with AI Integration gives that the attention it needs. Loops, If and Else, variables and functions will feel familiar (Lesson 144 to Lesson 148), though VBA has its own habits: Option Explicit and Dim to declare every variable, Sub against Function, Next r to close a loop. What is new is the object model. Lesson 143 reaches a sheet through ThisWorkbook and Worksheets by name, the loops address cells through Cells with a row number and a column letter, Lesson 149 sets Interior.Color with RGB, and Lesson 145 uses Find, searching upwards, to locate the last row. The editor has its own map (Lesson 141), and the Immediate window plays the part of a console (Lesson 151). Expect to move quickly through the syntax and spend your time on what makes VBA worth having: direct control of the workbooks your colleagues already open.

Will Power Automate take over from the macros in our engineering workbooks?

They do different jobs, and The Complete Excel Course with AI Integration teaches both so you can choose per task. A VBA macro lives inside the workbook and works on its cells directly: FormatWizard sweeps a sheet, flags and colours in one run, and the course notes that a macro usually runs faster than a flow on row-by-row work. Power Automate Desktop, which the AutoFlow project teaches from Lesson 174 and which needs Windows, works from outside: it opens a workbook, reads and writes cells, asks for an approval and runs from a desktop shortcut, with its logic laid out visually for anyone to audit. Where the Excel recorder writes VBA, its recorder builds a visual flow (Lesson 181). So VBA stays the tool for the check inside a calculation workbook, and a flow suits the routine around it, such as opening the file, recording a decision and closing it again.

Our next commissioning package is a month away: is that enough time to build a checking macro of my own?

Comfortably. The whole VBA path in The Complete Excel Course with AI Integration runs 1 hour 16 minutes, short enough to finish around project work, and the check that matters most, a loop that flags blank fields (Lesson 147), arrives in its second half. Build your own version alongside the lessons: after Lesson 150 your schedule's tags, ratings and readings can be checked, and after Lesson 152 every check runs from one master macro with an error handler. The FormatWizard starter and finished files let you test each step against a working answer, and on the instructor support plan a question about your own sheet is answered in writing by the instructor. Lifetime access keeps the lessons open for the next package, and finishing the course earns a Certificate of Completion with a verification link an employer can check.

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.