The Complete Excel Course with AI Integration

Excel macros and VBA for civil engineers

Every week the same site sheets need the same handling: a daily report set out for issue, a register of returns or test results read row by row for gaps and stray entries. The Complete Excel Course with AI Integration hands that routine to macros and VBA on FormatWizard, an industry-standard project, and this page picks out its lessons in the order they build: recording, buttons and macro-enabled files, the VBA editor, then loops, flags, colours and an error handler.

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 formats a daily report or a problem row in one click, with relative references so it works from whichever row you select.
  • Put a macro on a button or the Quick Access Toolbar and save it in a macro-enabled .xlsm workbook that the site team can open and run.
  • Open the VBA editor, read the code your recordings produced, and use macro security so only trusted files run their code.
  • Write VBA with declared variables and a reusable function that finds the last used row of a register that grows every day.
  • Loop through every row of a daily return or test log with For Next, flagging a missing activity code or name and building one message per row.
  • Mark an entry that is not a number in a quantity or reading column with IsNumeric, colour the cell at fault with RGB, and clear old flags before each run.
  • Trace what a macro reads with Debug.Print and the Immediate window, then run every check from one subroutine with an error handler.
  • Check a macro drafted by Claude or ChatGPT line by line before it touches a live register.

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 macro for a sales sheet, it is the shape of every site QA routine: old flags cleared, a loop over every row, each fault written beside its record, an entry that is not a number marked and the cell at fault coloured. Point it at a daily return, a delivery register or a test log and the logic holds.

  • Project 14

    Agentic AI in Excel

    AI finds and fixes the formula; you check it before it counts.

    Built around Copilot, ChatGPT and Claude on real tasks, it trains the prompting and reviewing routine to use when an assistant drafts VBA for a site register: a precise request first, then every line read before the code is allowed to run.

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 you can enter data and write formulas: the section assumes no programming, and its opening lessons need no code at all. New to Excel? Begin at Lesson 1 and arrive here with formulas and the IF function behind you. Already recording macros at work and at home in the editor? Jump to Lesson 143, where your own code begins, and keep Lesson 142 in mind for the first time a colleague's file asks you to enable content. The section runs in Excel for Windows or Mac, with the Windows shortcuts shown on screen.

17 of 186 lessons · 1 h 16 min

14 VBA and macros in Excel: FormatWizard 5 of 17 lessons · 19 min Macros before code, on a sheet of sales records: what a macro is, a first recording named and run, absolute references and then relative ones that follow the row you select, a button on the Developer tab and the Quick Access Toolbar, and the .xlsm format that keeps the code. A daily report set out the same way every morning is the first job to hand over.
  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 2 of 17 lessons · 10 min Inside the VBA editor: Alt+F11, the workspace and its modules, and the macro security and trust settings that decide which workbooks may run code, the thing to understand before a macro-enabled register goes round the site team.
  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
14 VBA and macros in Excel: FormatWizard 3 of 17 lessons · 14 min Your first code: a module that names its worksheet, variables and data types under Option Explicit, a Sub set against a Function, and GetLastUsedRow, built with Find and Exit Function, which tells every routine where a register ends however long it has grown.
  1. 143 Your first VBA code Modules, worksheets, rows, columns and formatting 4 min
  2. 144 VBA variables and data types Sub vs function for Excel beginners 6 min
  3. 145 VBA functions in Excel Build GetLastUsedRow with find and exit function 5 min
14 VBA and macros in Excel: FormatWizard 5 of 17 lessons · 27 min The checks, one idea a lesson: old flags and fill colours cleared before each run, a For Next loop that flags every missing value, If and Else tests that gather a row's faults into one FlagText message, Interior.Color and RGB for the cell at fault, and IsNumeric for an entry in a number column that is not a number.
  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
14 VBA and macros in Excel: FormatWizard 2 of 17 lessons · 8 min Finishing work: Debug.Print and the Immediate window to watch what the code reads before it writes anything, then RunFullValidation, one subroutine behind an error handler that runs every check over the whole sheet in a single pass.
  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 does a civil engineer get started with Excel macros and VBA?

With The Complete Excel Course with AI Integration from Coding Liquids, which teaches both inside FormatWizard, an industry-standard project designed after talking with people from many different industries. You start by recording: a macro named, given a shortcut and run, then made to follow whichever row you select (Lesson 137 and Lesson 138). Code follows one idea at a time: the VBA editor, variables, a function that finds the last row, a loop that visits every record, flags and colours for faults, a test for entries that are not numbers, and an error handler that holds it all together (Lesson 141 to Lesson 152). The lessons check a sheet of sales records; a daily return, a delivery register or a log of test results is checked the same way, since the code reads columns and rows, whatever the rows record. The section runs to 17 lessons and 1 hour 16 minutes of video, and it assumes no programming at all.

Which civil engineering spreadsheet chores are worth turning into macros?

The ones you repeat in the same order every week, and The Complete Excel Course with AI Integration teaches a tool for each kind. Formatting that never changes, such as a daily report set out for issue or a problem row marked in bold and colour, becomes a recorded macro on a button (Lesson 137 to Lesson 139). Checking that never ends, such as a register of daily returns, deliveries or test results read for blanks and stray entries, becomes a loop with flags (Lesson 147 and Lesson 148). Marking faults so the eye finds them is Interior.Color with RGB (Lesson 149), and catching a word or a note in a column of figures is IsNumeric (Lesson 150). Run together from one subroutine with an error handler (Lesson 152), they turn an hour of scrolling before a weekly report into one click. Design calculations stay with your own judgement and software; the paperwork around them is where macros pay back fastest.

Can a macro check our daily returns for missing activity codes and quantities typed as words?

Yes, and FormatWizard in The Complete Excel Course with AI Integration is built for exactly that kind of check. A For Next loop visits every row and writes Region missing in a flag column wherever the region cell is empty, using Trim so a cell holding only spaces counts as empty too (Lesson 147). Lesson 148 adds a second test and builds one FlagText message per row, the faults separated by a pipe, so a row missing both its region and its salesperson says so in one cell. Lesson 150 turns IsNumeric on the per-unit figure: an entry that cannot be read as a number, whether a word, a note such as N/A or a stray character, is coloured and flagged as invalid. Swap region for activity code and the per-unit figure for quantity placed, and the same loop reads your daily returns row by row to the last line, every evening, in seconds.

Can I automate the formatting of our daily site report without writing code?

Yes: the macro recorder writes the code while you work, and The Complete Excel Course with AI Integration teaches it before any VBA appears. In Lesson 137 you record a macro, name it, give it a keyboard shortcut and run it, and see why an absolute recording always returns to the same row. Lesson 138 switches on Use Relative References, so the recording follows your starting cell and one keystroke formats whichever row you select, which suits a report whose problem rows move every day. Lesson 139 adds the Developer tab and a button on the Quick Access Toolbar, and Lesson 140 saves the file as an .xlsm workbook so the macro survives. One warning from the lessons is worth taking to site: Ctrl+Z cannot undo a macro, so try a new recording on a copy first. The Personal Macro Workbook, met in that first recording, keeps a favourite macro available whenever Excel opens on your computer.

Our registers grow every day: how does the macro know where the data ends?

It asks the sheet, through a function you write yourself in The Complete Excel Course with AI Integration. Lesson 145 builds GetLastUsedRow: Find searches the sheet from the bottom upwards for the last cell holding anything and returns its row, and a COUNTA test first returns zero for an empty sheet, with Exit Function stopping there. On the lesson's data the answer is row 5071, and after one more row is pasted it is 5072, with nothing in the code changed. That is the habit a site register needs, since a fixed range such as rows 2 to 500 silently skips new entries the day the log passes it. Lesson 146 makes the function Public so every module can call it, and stops with a message when the sheet holds nothing but headers. Every check that follows loops from the first data row to whatever row the function reports.

Can VBA colour the cells that fail a check, the way a calc sheet marks a fail?

Yes, and The Complete Excel Course with AI Integration teaches the colouring and the clean-up that keeps it honest. Lesson 149 adds one line under each test, Interior.Color set with RGB, so a missing region or salesperson turns a soft warning red while its message goes into the flag column: two signals from one run. RGB mixes red, green and blue from 0 to 255, so any colour your office uses for a fail can be matched. Lesson 146 clears the last run's messages and fills first, so a fault you have fixed never stays red. The lessons colour blanks and entries that are not numbers; a value over its limit is the same If test with a comparison in it, the kind Lesson 146 already uses to stop on a sheet without data. Design checks themselves are not taught, but the macro that marks every failing row of a long schedule is yours from this section.

If ChatGPT or Claude drafts a macro for my quantity sheet, how do I know it is safe to run?

By reading it the way The Complete Excel Course with AI Integration teaches you to read your own. In Lesson 148 you write parts of the FormatWizard macro with Claude or ChatGPT, each in its own window, and correct what comes back, so the habit is built on real code. The section supplies the tests: Option Explicit, which refuses an undeclared variable and so catches typing slips (Lesson 144); Debug.Print and the Immediate window, which show what the code reads before it writes a thing (Lesson 151); and an error handler that reports a failure instead of crashing (Lesson 152). Two rules from the early lessons matter most with borrowed code: Ctrl+Z cannot undo a macro, so run it on a copy, and enable content only in files you trust (Lesson 142). An assistant can type a macro in seconds; deciding whether it does the right thing to your quantities stays your job, and this section trains you for it.

Should I learn VBA or Python to automate my engineering spreadsheets?

For the workbooks you already run, VBA, and The Complete Excel Course with AI Integration teaches it from the first recording. VBA lives inside desktop Excel: the code is saved in the .xlsm file beside the data it checks (Lesson 140), a colleague runs it from a button (Lesson 139) once the file is trusted, and nothing else has to be installed on a site laptop. It reads the sheet directly, row by row and cell by cell, which is what a check of daily returns or test logs needs (Lesson 147). Python is not taught in the course and suits work outside a workbook; for the sheets your team already shares, VBA gets you to a working tool sooner. The ideas carry either way: variables and data types, a function that returns a value, loops, conditions and error handling (Lesson 144 to Lesson 152) are the grammar most languages share, so VBA learnt well makes a second language easier.

Can I share a macro with the site team without breaking it or tripping security warnings?

Yes, and The Complete Excel Course with AI Integration covers the three things that decide it. The file type: a standard workbook strips out every macro when saved, so Lesson 140 saves as a macro-enabled .xlsm, the format that carries code with data. The way in: Lesson 139 puts the macro on the Developer tab and a Quick Access Toolbar button, so nobody needs to know its name or shortcut. The warning: the yellow bar saying macros have been disabled, and the macro security and trust settings behind it, explained in Lesson 142 with the rule to enable content only in files you trust. Add relative references (Lesson 138) so the macro works from whichever row a colleague selects, and GetLastUsedRow so it copes with their longer sheet, and a macro you wrote runs as well on someone else's machine as on yours.

What VBA will I know by the end, and how far towards tools of my own does it take me?

The building blocks of the language, enough to build and defend a checking tool of your own. By the close of the macro section of The Complete Excel Course with AI Integration you can declare variables with the right data types under Option Explicit, tell a Sub from a Function and write one that returns a value, address worksheets, rows, columns and their formatting, loop with For Next, branch with If and Else, test data with IsNumeric, colour cells with RGB, trace code with Debug.Print and protect a run with an error handler that restores screen updating (Lesson 143 to Lesson 152). Those are the parts any engineering tool in Excel is assembled from. UserForms, links to analysis or drawing software and export to PDF lie beyond the lessons; the logic every such tool rests on does not, and you leave able to read, extend and debug the macros a colleague hands you.

How do I find the fault when a macro goes wrong halfway down a long log?

With the debugging tools The Complete Excel Course with AI Integration teaches before the finished macro, so faults are caught early. Debug.Print writes to the Immediate window, opened with Ctrl+G, without touching the sheet or raising a pop-up (Lesson 151): print each row number with the value the code reads, check the first few, and you know it reads the right cells in the right order before it writes flags over hundreds of rows. Compile errors are met and fixed along the way, a missing End With in Lesson 142 and a missing declaration that Option Explicit catches in Lesson 150. Lesson 152 then wraps the full run in an error handler: if anything fails, screen updating is restored and Err.Description names the problem instead of the macro crashing mid-run. On a test log thousands of rows long, that is the difference between a fault found in a minute and a morning lost.

Why learn VBA at all when the recorder can capture my steps?

Because a recording repeats clicks but cannot decide anything, and The Complete Excel Course with AI Integration shows the exact moment that matters. The macros recorded in Lesson 137 and Lesson 138 bold and highlight a row with a negative amount, and in the editor (Lesson 142) the lesson points out that the recorded code formats its row without checking that the amount is negative at all. A recording cannot look down a column for the rows that need attention, pass over the ones that do not, or say what is wrong. VBA adds exactly those powers: an If that tests a value (Lesson 146), a loop that visits every row (Lesson 147) and a message that names the fault (Lesson 148). On a register of daily returns, the recording formats a row you have already found; the code finds every such row for you, marks it and tells you why.

How long before a macro saves me time on the weekly report?

From the first sitting: The Complete Excel Course with AI Integration has a working recorded macro on a button by Lesson 140, and the whole section runs to 1 hour 16 minutes of video. Those opening lessons give you a recording that formats any row you select, a button that runs it and a macro-enabled file that keeps it, enough to take the routine formatting off a weekly report. The checking macro builds over the short lessons after them: a loop by Lesson 147, colours by Lesson 149, a data-type test by Lesson 150, until Lesson 152 runs every check in one go. Typing the code yourself and pointing it at your own register takes longer than watching, and it is the part that makes the skill yours. Lifetime access keeps the lessons open for the next chore, and finishing the course earns a Certificate of Completion that an employer can verify through its link.

Can I keep the finished macro workbook and adapt it to our own registers?

Yes: FormatWizard in The Complete Excel Course with AI Integration comes as a starter workbook to build on and a finished macro-enabled workbook holding every routine, and both are yours to keep. Adapting the finished one is mostly a matter of column letters and messages. The region and salesperson tests become checks on your activity code and foreman (Lesson 148), the IsNumeric test moves from the per-unit figure to your quantity or reading column (Lesson 150), and the flag column can sit wherever your register has room. Because each check lives in its own module and RunFullValidation calls them in order (Lesson 152), adding a check means adding a routine and one line to the master macro. Change the text of each flag to your office's words, keep the error handler, and the tool you built on sales records becomes the first line of QA on site data.

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.