The Complete Excel Course with AI Integration
Excel macros and VBA for insurance underwriters
Loss runs to tidy, schedules of values to check, bordereaux with blanks and notes where figures belong: the same clicks every week. The Complete Excel Course with AI Integration turns them into macros on FormatWizard, an industry-standard project, and this page picks out its lessons for an underwriter: recording, the VBA editor and its trust settings, a last-row function, loops that flag and colour, number checks and one routine that runs every check.
Taught by Sagnik Bhattacharya and Virginia Thorn
What you will be able to do
At work, you will be able to:
- Record the layout every referral pack or loss run summary gets, then replay it from a shortcut or a button on the Quick Access Toolbar.
- Record with relative references, so one keystroke formats whichever claim or submission row you are standing on.
- Save checking macros in a macro-enabled workbook, and switch code on only in the incoming files whose sender you know and trust.
- Write a VBA function that finds the last row of a bordereau, however long this month's file runs, and reuse it in every check.
- Loop down a loss run or a schedule of values, write the reason for every blank into a flag column and colour the cell that failed.
- Catch a word or a note such as TBC sitting in a figure column, with IsNumeric, before a rate is applied to it.
- Test what a macro reads with Debug.Print, then run every check from one master routine whose error handler 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.
The course's macro project, built on a sheet of sales records: by its end, one routine clears old flags, marks blanks and non-numbers row by row, colours each failure and reports any error. It is the checking routine an underwriter wants run over every bordereau, schedule and loss run that lands.
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 work in Excel daily but have never recorded a macro: FormatWizard opens there with its starter workbook, and the section builds one tool from a first recording to a full check. Already record macros? Move to Lesson 141, where the VBA editor and the code begin. New to Excel itself? Begin at Lesson 1, and take the IF, AND and OR of Lesson 33 on the way, since every check in VBA is the same logic written as code.
17 of 186 lessons · 1 h 16 min
14 VBA and macros in Excel: FormatWizard Recording first, with no code: what a macro and VBA are, a first macro recorded and run from a shortcut, relative references so it formats whichever row you start on, the Developer tab with a toolbar button, and saving as .xlsm so the code survives. Enough to put the house layout of a loss run or a referral pack on one click.
- 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 and its safety rules: opening it with Alt+F11, modules in the Project Explorer, the yellow bar that holds macros back until Enable Content, and the habit of enabling code only in files you trust, which matters the day a broker or coverholder sends a workbook with code of its own.
- 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 First code: pointing a macro at its workbook and sheet, Option Explicit, comments, declared variables, a Sub that acts set against a Function that hands back a result, then GetLastUsedRow, which reports where the data ends whatever length this week's bordereau runs to.
- 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 checks themselves: last run's flags and fills cleared, a loop from the second row to the last that writes a flag wherever a cell is empty, two tests joined in one flag text, the failing cells coloured with RGB, and IsNumeric for words and notes in a figure column. The lessons check sales records for a missing region or salesperson; a loss run or schedule of values takes the same tests on its own columns.
- 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: the Immediate window, where Debug.Print shows what the code reads before it writes anything, and RunFullValidation, one routine that calls every check in turn with screen updating off and an error handler that reports what went wrong.
- 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.
Which Excel macros and VBA would an insurance underwriter build first: the loss run layout, the bordereau check, or both?
Both, in that order, and The Complete Excel Course with AI Integration from Coding Liquids teaches them on FormatWizard, an industry-standard project designed after talks with people in many different industries. You begin by recording the formatting you repeat (Lesson 137), then write VBA that finds the last row of any file, clears the previous run's flags, loops down every row to flag blanks and entries that are not numbers, colours each failing cell and runs the lot from one master macro with an error handler (Lesson 152). The lessons check a sheet of sales records; at your desk the same routine reads a loss run, a schedule of values or a coverholder's bordereau, with your column letters in place of the course's. Its 17 lessons take 1 hour 16 minutes, with the starter workbook and the finished macro file, so each check you write can be set beside one that works.
Referral rules already live in IF formulas and bordereaux go through Power Query: where does a macro still earn its place?
On the files that arrive from outside and need a person's eye, row by row, at the moment you choose. A formula such as the IF with AND and OR of Lesson 33 belongs on your rating sheet, recalculating as each input changes, and Power Query belongs wherever the same export is cleaned every month. A macro does a third job: it inspects a broker's file once, as it arrives, and leaves its verdict in the sheet. The Complete Excel Course with AI Integration builds that verdict in FormatWizard: every row looped through (Lesson 147), a reason written into a flag column (Lesson 148), the failing cell coloured (Lesson 149), and the whole check reset and run again when the corrected file comes back (Lesson 146). The formatting you give every referral pack is macro work too, recorded once in Lesson 137 and replayed from a button.
Each referral goes up the line with its loss run laid out the same way: can the recorder do that formatting for me?
Yes, with no code at all. The Complete Excel Course with AI Integration records a first macro in Lesson 137: View, Macros, Record Macro, a name without spaces, a letter for the shortcut, your formatting steps, Stop Recording, and the whole sequence then replays in one keystroke. Lesson 138 switches on Use Relative References, so the macro formats whichever row you start from instead of the row it was recorded on: one shortcut for every open claim or declined risk you land on. Lesson 139 puts the macro on a button in the Quick Access Toolbar, and Lesson 140 saves the workbook as a macro-enabled file, since saving as an ordinary .xlsx strips the code out. Kept in the Personal Macro Workbook, which Lesson 137 also explains, the macro is on hand in every broker file you open on that computer.
The recorder can bold a row I pick, but can a macro work out for itself which loss-run rows are open or large?
That is the step from recording to VBA, and The Complete Excel Course with AI Integration takes it on purpose. In Lesson 142 the recorded code is opened and read, and the lesson points out what it lacks: it formats whatever row you are on without checking that the amount there is negative. Deciding needs an If inside a loop, which Lesson 147 writes: For r = 2 To lastRow walks down every row, an If tests one cell, and a message lands in the flag column whenever the test is met. The lessons test for a missing region; on a loss run, the same If can read the status column for Open, or set incurred against your large-loss figure. Lesson 149 then colours the cell with Interior.Color, so a long listing shows its open and large claims in a soft red the moment the macro finishes.
'TBC' or 'per schedule' sits where a broker should have put the sum insured: can a macro find every such cell before rating starts?
Yes: The Complete Excel Course with AI Integration writes that check with IsNumeric in Lesson 150. The macro walks down a figure column and asks of each entry whether Excel can treat it as a number; a word, a note such as N/A or TBC, or a stray character fails, so the cell and its flag turn red and the flag column records the value as invalid. The lesson runs it on the sales sheet's per-unit figures; point it at sums insured, premiums or deductibles and every placeholder a broker typed is caught before a rate meets it. The test asks whether an entry reads as a number, not whether the figure is right, so blanks stay with the missing-value loop of Lesson 147, and amounts held as text go to the clean-up lessons, Power Query's data types among them (Lesson 158).
Can the finished macro check a schedule of values before I rate it, from blank addresses to missing sums insured?
That is FormatWizard's finished macro at work, with its checks pointed at the schedule's columns. In The Complete Excel Course with AI Integration, the macro that closes the VBA section, RunFullValidation (Lesson 152), runs its routines in order at one click: old flags and fills cleared (Lesson 146), each row tested for missing entries in two columns with every problem written into one flag, separated by a pipe (Lesson 148), the failing cells coloured (Lesson 149), and a figure column checked with IsNumeric (Lesson 150). On a schedule, the two text checks become address and occupancy, say, and the number check becomes the sum insured, with your column letters replacing the course's. GetLastUsedRow (Lesson 145) finds the end of a twelve-location schedule and a two-thousand-location one alike, and the starter and finished workbooks let you set your version beside one that works.
A coverholder's bordereau arrives as a macro-enabled workbook: should I enable its content?
Trust decides it, and The Complete Excel Course with AI Integration teaches the settings and the reading that let you decide well. Lesson 142 covers macro security: the yellow bar announcing that macros have been disabled, the Enable Content button, and the rule to enable code only in files whose source you trust. Lesson 140 explains the file types, so an .xlsm attachment tells you code is inside, while an .xlsx file cannot carry any. Lesson 141 opens the VBA editor with Alt+F11 and walks through its Project Explorer and modules, and once you can read a module you can look at what a file's code does before letting it run. A workbook from a known coverholder whose macro you expect is one case; an unexpected macro file from an unfamiliar sender stays disabled and goes to your IT team.
Insurers keep a tight grip on what their PCs run: is VBA still worth an underwriter's time?
Yes, and that tight grip is part of the reason: VBA comes inside the desktop Excel already on your machine, so there is nothing extra to install. The Complete Excel Course with AI Integration uses only Excel's own Developer tab and VBA editor (Lesson 139, Lesson 141), and the finished checking macro is one .xlsm file a colleague can open and run. Two limits are worth knowing up front: Excel in a browser does not run VBA, so macros belong to the desktop app, and Office Scripts, the newer scripting tool for Excel, is not taught here. Where a job suits another tool, the course has that too: Power Query for exports that return every month, Power Automate Desktop on Windows for routines that cross programs, and Copilot, ChatGPT and Claude, two of which help draft parts of a macro in Lesson 148 before you correct them.
ChatGPT will draft VBA for a loss run in seconds: what must I be able to read in it before it runs?
Four things, and The Complete Excel Course with AI Integration teaches each before the AI comes in. Which sheet the code points at: Lesson 143 shows that code must know its workbook and sheet before it can do anything. Whether every variable is declared: Option Explicit, from Lesson 144, stops a typo from running silently. Which column each line tests and colours: Lesson 149 shows how a B left where C belongs lights up the wrong column. And what the loop actually reads: Lesson 151 prints row numbers and values to the Immediate window with Debug.Print, writing nothing to the sheet. In Lesson 148 learners write parts of the macro with Claude or ChatGPT in its own window and then correct them, the right order for an underwriter. Run every draft on a copy first, since Ctrl+Z cannot undo a macro.
An underwriting authority review asks what was checked on each bordereau: does the macro leave evidence?
Yes: what it found stays written in the file. The Complete Excel Course with AI Integration has the macro write its findings as text into a flag column rather than only colouring cells (Lesson 147), with several findings on one row joined by a pipe (Lesson 148), so a saved copy shows, row by row, what failed and why. Lesson 152 makes the checks add to that column instead of overwriting each other, and ends each run with a message, or with the error's own description if something breaks. The code documents the rules too: comments, written after a single quote, explain each check in plain words (Lesson 144), and anyone holding the .xlsm file can open the module and read exactly what was tested. Keep the flagged copy with the bordereau and the review has its evidence.
I can read a policy wording line by line but have never seen code: how does the course take me into VBA?
Line by line, which suits a reader of wordings. The Complete Excel Course with AI Integration starts with no code at all: Lesson 136 explains that a macro is a recorded sequence of actions and VBA the language it is written in, and Lesson 137 records one. Lesson 141 then opens the VBA editor so you can read what the recorder wrote, and Lesson 143 types a first line that names the sheet the code works on. From there each routine is typed or pasted and read a line at a time: variables, and how a Sub that acts differs from a Function that hands back an answer (Lesson 144), a function that finds the last row (Lesson 145), then the If statements and loops that make the checks. Each piece runs before the next is added, so nothing arrives as a wall of code you have to take on trust.
A portfolio's claims listing runs to tens of thousands of rows: will the check finish before the broker call?
Long listings are what the finished macro is built for. The FormatWizard sheet in The Complete Excel Course with AI Integration runs past five thousand rows, and every check walks all of them. Lesson 152 switches screen updating off while the routines run, so Excel stops redrawing the sheet after every flag, and switches it back on at the end, inside the error handler as well, so a failed run never leaves the screen frozen. GetLastUsedRow (Lesson 145) finds the bottom with one search upwards from the end of the sheet instead of stepping through empty rows, and every loop stops at that row. The Power Automate lessons make the same point from the other side: a flow lays its logic out visually, but over a long sheet a VBA macro usually runs faster (Lesson 185). For a check run before a call, that speed is the point.
Quotes and renewals fill my days: how long until a check of my own bordereaux runs, and does it need Windows?
About 1 hour 16 minutes of lessons, and no Windows requirement: the course's requirements name Windows only for Power Pivot and Power Automate. The Complete Excel Course with AI Integration records its macro lessons on Windows, so on a Mac some screens look different, as Lesson 139 notes, and the shortcuts shown, Alt+F11 among them, are the Windows ones. Recording pays back early: by Lesson 140 a formatting macro is saved and sitting on a button. The checking loop is in place by Lesson 150, and Lesson 152 joins the checks into one. Build each part on a copy of a real bordereau as you go and it becomes your own check by the last lesson. Lifetime access keeps FormatWizard open for the next rule you add, and completing the course brings 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.
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 underwriters
- XLOOKUP and VLOOKUP for underwriters
- PivotTables for underwriters
- Excel charts for underwriters
- Excel dashboards for underwriters
- Conditional formatting for underwriters
- Data cleaning for underwriters
- Data validation for underwriters
- Excel tables for underwriters
- Text functions for underwriters
- Power Pivot and DAX for underwriters
- Power Automate for underwriters
- Claude in Excel for underwriters