The Complete Excel Course with AI Integration
Excel macros and VBA for quantity surveyors
Every returned bill brings the same chores: rates written as words, items with no unit or quantity, house formatting to apply again before the figures reach a report. In The Complete Excel Course with AI Integration the skill is built on FormatWizard, one of its industry-standard projects, starting with recorded steps and ending with checking code you write yourself, and every lesson below is tied to the bills, tender returns and valuations a quantity surveyor handles.
Taught by Sagnik Bhattacharya and Virginia Thorn
What you will be able to do
At work, you will be able to:
- Record a macro that applies your house formatting to a line of a bill or valuation, then switch to relative references so one shortcut formats whichever item you select.
- Run macros from the Developer tab or a Quick Access Toolbar button, keep them in an .xlsm workbook or the Personal Macro Workbook, and send bills out as plain .xlsx files.
- Open the VBA editor with Alt+F11, read what a macro does before trusting it, and apply macro security settings to workbooks that arrive from tenderers.
- Write VBA with declared variables and GetLastUsedRow, a function you write to locate the bottom of the data, so a check reaches the final item of a bill of any length.
- Loop down every item with For Next and If, writing beside each one what is missing, unit, quantity or rate, as one combined flag message.
- Catch a rate cell holding a word such as incl or TBC with IsNumeric, paint it with an RGB colour through Interior.Color so it stands out, and wipe the last run's flags before checking a revised return.
- Watch what a macro reads with Debug.Print before it writes anything, and run every check from one master macro whose error handler says what failed instead of stopping halfway.
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 sheet of sales records, it grows into the checker a QS sets loose on a returned bill: last run's flags cleared, every row read down to the final item, blanks and non-numbers written up and coloured, and a master macro behind an error handler, with the finished .xlsm file to compare against yours.
-
Project 13
AutoFlow
The weekly report routine, run by a flow instead of by you.
Built around a weekly sales report, it shows the other half of automation, on Windows: a Power Automate Desktop flow that launches Excel, reads the sheet, loops through rows and writes answers back, for the routines that start outside Excel rather than inside one bill.
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
Anyone who already builds a bill's formulas and wants them checked and formatted for them begins with Lesson 136: the section takes no programming for granted. New to Excel? Open the course at Lesson 1 and arrive here with references and the IF function behind you. Recording macros already? Join at Lesson 141, the lesson that opens the editor behind every macro and starts the code you will adapt to your own bills.
17 of 186 lessons · 1 h 16 min
14 VBA and macros in Excel: FormatWizard Recording before code: a macro named, given a Ctrl shortcut and replayed, first fixed to one row by absolute references, then made to follow the selection by relative ones, then given a Developer tab button and a place on the toolbar, and saved as an .xlsm workbook. The rows it formats hold a negative amount, the way an omission sits in a variation account.
- 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 The VBA editor, reached with Alt+F11, and where a workbook keeps its modules; then the yellow bar that holds macros back and the security settings behind it, which a QS needs in mind before enabling anything that arrives with a tender return.
- 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
14 VBA and macros in Excel: FormatWizard Typing begins: a module pointed at its worksheet, Option Explicit and declared variables, a Sub that acts set beside a Function that hands back a result, and GetLastUsedRow, which every later macro calls to learn where a bill of any length stops.
- 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 checking routines, built in turn: last run's flags and fills wiped, a For Next pass down the rows writing a note wherever a key cell is blank, If and Else joining every fault on a row into one message, the faulty cell painted through Interior.Color with an RGB mix, and IsNumeric catching words in a number column. The lessons police sales rows; a priced bill takes the same tests.
- 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, then the finished tool: values printed to the Immediate window with Debug.Print, so you see what the code reads before it writes a flag, and RunFullValidation, the master routine that calls every check in order behind an error handler.
- 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.
Priced bills, tender returns, valuations: which Excel macros and VBA course turns their checks into one click for a quantity surveyor?
The Complete Excel Course with AI Integration from Coding Liquids does, through FormatWizard, one of its industry-standard projects, designed after talking with people from many different industries. You record macros first, with no code, then write VBA one idea a lesson until a single macro clears the last run's flags, reads every row down to the last, writes what is missing beside each one, colours each faulty cell and catches a number column holding words. The lessons check a sheet of sales records; a priced bill or a subcontractor's return has the same make-up of key columns, figures and rows, so the checks carry straight across. The 17 lessons picked out here take 1 hour 16 minutes of video, the starter and finished macro workbooks come with them, and none of them expects you to have written code before.
Numbering bill items, tidying rate lists, formatting valuations, checking returns: how much of that QS automation does the section teach?
Formatting and checking, the two that come round with every bill, are taught from start to finish in The Complete Excel Course with AI Integration. Recorded macros apply house formatting in one keystroke (Lesson 137 and Lesson 138), and written VBA checks a whole sheet: blanks in key columns, words where figures belong, a coloured cell and a reason beside each fault (Lesson 147 to Lesson 150). Numbering and tidying are built from the same parts, a loop that visits every row and an If that decides what to write, so once you can read FormatWizard's loop you can give it a numbering rule of your own. Exporting to PDF and functions typed into worksheet cells are not lessons; the time goes instead into the reasoning every such macro needs, and into proving the code before it runs (Lesson 151).
Subcontractors write incl, by others or TBC in the rate column: will a macro find every one?
Yes: IsNumeric asks each rate whether it can be treated as a number, and The Complete Excel Course with AI Integration builds that check in Lesson 150. A loop visits every row, and where the per-unit column holds a word, a note such as N/A or a stray character, the macro colours that cell and the flag cell light red and writes that the entry is invalid. On a returned bill that turns a careful scroll through every rate into one run, with the queries for the tender clarification meeting already marked. An incl or a by others is not always wrong, of course: the flag puts it on your list, and deciding whether the item is covered elsewhere stays your judgement. Figures held as text are a different fault, which IsNumeric passes: setting COUNT against COUNTA finds them (Lesson 35), and the worksheet clean-up lessons put them right.
Can a macro write what is wrong beside each bill item, such as no unit, no quantity or no rate?
Yes, in words, and as many faults per item as it finds. In The Complete Excel Course with AI Integration, Lesson 147 sends a For Next loop down every row and writes a message in the flag column wherever a key cell is blank, with Trim making sure a cell of spaces still counts as empty. Lesson 148 gathers several tests into one message per row, separated by a pipe, so an item missing both its unit and its rate says both at once. Lesson 149 colours the cells at fault, and Lesson 146 clears the previous run's flags and fills first, which matters when a tenderer sends a revised return after clarifications: the new run shows only what is still wrong. The lessons test region and salesperson columns; on a bill they become unit, quantity and rate.
Each tenderer's return is a separate workbook: where should my macros live so they run on all of them?
Close at hand in your own files, never in the bill you issue, and The Complete Excel Course with AI Integration shows both homes. Lesson 137 records into the workbook itself and introduces the hidden Personal Macro Workbook, which keeps a macro ready whenever Excel opens on your computer, a natural home for formatting you apply to every return. Lesson 139 gives a macro its own Quick Access Toolbar button, while Lesson 140 explains why a standard .xlsx file strips out every macro on saving while .xlsm keeps the code. That suits a QS well: the bill goes to tenderers as plain .xlsx, and the checking stays with you. For the written checks, Lesson 143 explains the line that tells code which workbook and sheet to work on, so you know exactly what to point at a return.
Returns sometimes arrive as macro-enabled files from outside the firm: is it safe to enable them?
You will know before you click, because The Complete Excel Course with AI Integration gives you both sides of that decision: the security settings and the ability to read the code. Lesson 142 covers the trust settings for macros: the yellow bar that holds a workbook's macros back until you choose Enable Content, and the rule of enabling content only for files you trust. Lesson 141 opens the VBA editor with Alt+F11 and shows where a workbook keeps its modules, so you can read what a macro does before it ever runs. A priced bill has no need of code, which makes an unexpected macro in a return worth a question to the tenderer before anything is enabled. Knowing the editor also means a return that arrives with a rogue module is spotted in a minute, instead of trusted by default.
An omission in the variation account shows as a negative amount: can a recorded macro format those lines?
Yes, and with one keystroke per line, since The Complete Excel Course with AI Integration records exactly that kind of macro. In Lesson 137 the recording formats a row holding a negative amount in bold, italic and a highlight, and runs it again from a shortcut; with absolute references it always formats the same row. Lesson 138 records a second macro with relative references, so its own shortcut formats whichever row you select, which is how an omission or a credit is marked wherever it sits. Lesson 142 then points out the limit: recorded code formats without checking that the amount really is negative. That check is what VBA adds, with the If statements and the loop of the later lessons, so the step after one keystroke per line is code that finds every negative line by itself.
Can a macro number the items of a bill and start again at each new section?
The parts such a macro needs are all taught in The Complete Excel Course with AI Integration, one lesson at a time. Lesson 145 builds GetLastUsedRow to locate the bottom of the data, Lesson 147 sends a For Next loop down every row, Lesson 148 brings in If and Else so each row receives the right entry, and the loop writes into a cell of the row it is on. FormatWizard uses those parts to write flags; a numbering macro uses them to write the next item number, skip heading rows and reset the count where a section begins, rules you add once the loop reads plainly to you. Laying a bill out for print, with its print area, page orientation and fit to the page, is a worksheet job taught in Lesson 27. Built this way, the numbering is your own code, so a change in house style is one line to edit.
Can VBA roll each trade's total up onto the summary or collection page?
Formulas do that job best, and The Complete Excel Course with AI Integration teaches them before any code. SUMIFS totals every item of a trade or section in one formula that stays live as rates change (Lesson 37), and a PivotTable sums every trade of a bill in a few clicks (Lesson 57 onwards), both outside this page's path. A macro that copies totals onto a summary page leaves figures that go stale the moment a rate moves, which is the last thing a collection page should do. VBA earns its keep where formulas cannot reach: reading every row, writing a reason beside each fault, colouring it and clearing it all again on the next run, the work FormatWizard does. Use formulas for a bill's sums and the macro for its policing, and the two never fight over a cell.
Before a macro writes into a long priced bill, how do I prove it reads the rate column and not the amount column?
Make it report before it writes, as The Complete Excel Course with AI Integration teaches in Lesson 151. Debug.Print sends values to the Immediate window instead of the sheet, so a short routine can print each row number with the value it reads, and a glance at the first few rows against the bill shows whether the code is in the right column. Lesson 149 shows the slip this guards against: a colour line copied for a second check with its column letter left unchanged, and the wrong column lights up. Lesson 137 adds the reason for care, since Ctrl+Z cannot undo a macro, so a first run belongs on a copy of the bill. Lesson 152 finishes with an error handler that reports what went wrong instead of stopping halfway with the sheet half flagged.
An AI draft of my bill-checking macro hard-codes the last row and the rate column: what will the lessons let me fix in it?
Everything that makes a draft fit your bill, because The Complete Excel Course with AI Integration teaches the parts such a draft is made of. Lesson 148 itself hands pieces of the code to Claude or ChatGPT, each used in its own window, and then has you put right what comes back, so the habit is built into the section. A fixed last row gives way to GetLastUsedRow from Lesson 145, which finds the end of a bill of any length. Option Explicit and declared variables from Lesson 144 catch a mistyped name before it does damage. Column letters inside the loop are read and changed with what Lesson 147 and Lesson 149 teach, and Debug.Print proves the corrected version reads the rate column before it writes a flag. The assistant types fast; you decide what the code checks.
Bills still travel between consultants, contractors and subcontractors as Excel files: does that keep VBA worth a QS's time?
Yes, because VBA works where the bill lives: inside desktop Excel, on the file that arrived this morning. The Complete Excel Course with AI Integration teaches it to the point of a complete checking macro, so each return can be policed in one click before its figures reach a tender report or a valuation. Power Automate Desktop, taught later in the course on Windows (Lesson 174), suits routines that run from outside Excel, such as opening a workbook, reading it and writing back, and the two sit well together. Office Scripts, the browser's form of automation, stay outside the course. Whatever replaces what in future, a QS who can read a loop and an If statement can judge any tool's output, and that reading is exactly what FormatWizard trains.
Could FormatWizard's finished workbook become the checking tool for our own bill layout?
Yes, and adapting it is the natural next step once the section is done. The Complete Excel Course with AI Integration gives you both FormatWizard files, the starter you build on and the finished .xlsm holding every routine, so the code you adapt is code you have already typed once. The changes are the ones the lessons make plain: the line that names the workbook and sheet the code works on (Lesson 143), the column letters inside each check, where the region and per-unit columns of the lessons become your unit and rate columns (Lesson 147, Lesson 150), and the flag column where messages land. Run it first on a copy of a returned bill, with Debug.Print showing what it reads (Lesson 151). A free macro pack found online offers someone else's layout and code you never wrote; enable such content only for files you trust, as Lesson 142 teaches.
From the first recording to a check on a real bill, how long does the section take, and will it run on a Mac?
About 1 hour 16 minutes of video, and the first useful macro arrives long before the end. By Lesson 140 of The Complete Excel Course with AI Integration a recorded macro formats any row you choose, run by a key combination or a button, and is saved in a macro-enabled file; the written checks then come in small steps until Lesson 152 gathers them under one master macro. Allow longer than the video for typing the code and trying it on a bill of your own, which is where the skill really sets. VBA runs in Excel for Mac as on Windows: across the whole course, only the Power Pivot lessons and the Power Automate section need Windows, and the Developer tab lesson is shown on Windows, with Mac screens slightly different. Lifetime access keeps the section open for the next return, and finishing the course brings a Certificate of Completion.
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 quantity surveyors
- Lookups for quantity surveyors
- Pivot tables for quantity surveyors
- Excel charts for quantity surveyors
- Excel dashboards for quantity surveyors
- Conditional formatting for QS
- Data cleaning for quantity surveyors
- Data validation for quantity surveyors
- Excel tables for quantity surveyors
- Text functions for quantity surveyors
- Date functions for quantity surveyors
- Dynamic arrays for quantity surveyors
- Power Query for quantity surveyors
- Power Pivot & DAX for quantity surveyors
- Power Automate for quantity surveyors
- Copilot for quantity surveyors
- ChatGPT for quantity surveyors
- Claude in Excel for quantity surveyors
Macros and VBA for other jobs
- Macros and VBA for civil engineers
- Macros and VBA for quality 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