The Complete Excel Course with AI Integration

Excel macros and VBA for claims handlers

Every bordereau and claims extract gets the same treatment before anyone works it: the same formatting, the same hunt for blank handlers, missing causes and notes typed where a reserve belongs. The Complete Excel Course with AI Integration turns that routine into macros and VBA on FormatWizard, a project built to industry standard, from a first recorded macro to one validation macro that checks the whole sheet and says what is wrong in each row.

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 weekly formatting of a claims extract as a macro, with absolute or relative references, and replay it from a shortcut key.
  • Run claims macros from the Developer tab or a Quick Access Toolbar button, and keep them safe in an .xlsm file, the format that holds macros.
  • Open recorded code in the VBA editor, read it, and judge which incoming claims files are safe to enable macros in.
  • Write a loop that visits every claim on a bordereau and flags the ones with no handler or no cause of loss, a cell of spaces counted as empty.
  • Flag an entry in a reserve or payment column that cannot be read as a number, such as TBC or N/A, and colour it light red before any total is built on it.
  • Find the last row of each week's file in code, clear last run's flags, and run every check from one master macro with an error handler.
  • Test a claims macro with Debug.Print in the Immediate window before it writes a single flag.

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 to check a sales sheet, it teaches the validation a claims extract needs one routine at a time: a Flag column that names each row's faults, a soft red fill on every cell at fault, last run's flags cleared first and a master macro that calls the rest. Read region as handler and salesperson as cause of loss, and the checks carry straight over.

  • Project 07

    TaskFlow

    One sheet that shows what is done, what is late and what is urgent.

    Built for tasks, it shows the date side handled without code: overdue rows coloured by conditional formatting, the working days to each deadline counted by NETWORKDAYS against TODAY, and a sheet locked against stray edits. Set beside a validation macro, it splits the work sensibly: formulas for ageing, VBA for what each claim holds.

  • Project 13

    AutoFlow

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

    Built around a weekly sales report, it automates Excel from outside the workbook with Power Automate Desktop flows that open a file, read and write cells, branch on Yes or No and loop over rows, on Excel for Windows. Its last lesson weighs a flow's visible, code-free steps against a macro's speed.

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

Begin with Lesson 136 when Excel is part of your working day but you have never recorded a macro: FormatWizard starts with the recorder and reaches code one small step at a time. Recording macros already? Join at Lesson 141, the first look inside the VBA editor, or at Lesson 143 for the first line typed by hand. Someone new to spreadsheets is better served by Lesson 1 first, coming back here once tables and IF formulas feel routine.

17 of 186 lessons · 1 h 16 min

14 VBA and macros in Excel: FormatWizard 3 of 17 lessons · 12 min Macros and VBA defined, then the recorder at work: a first macro that formats a row holding a negative amount, named, given a shortcut and stored in the workbook, and a second recorded with relative references so it acts on whichever row is selected. On claims, the row you want marked, a recovery entered as a negative payment for instance, is formatted with one keystroke.
  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
14 VBA and macros in Excel: FormatWizard 4 of 17 lessons · 16 min Macros kept within reach and kept safely: a Developer tab switched on, a Quick Access Toolbar button, Save As .xlsm so the code survives, a tour of the VBA editor, and the security setting behind the yellow bar that decides whether a file's code may run.
  1. 139 Developer Tab in Excel Run macros from a button and the quick access toolbar 4 min
  2. 140 Save macros in Excel Macro-enabled workbooks and the XLSM file format 3 min
  3. 141 The VBA Editor in Excel Open it with Alt+F11 and learn the workspace 4 min
  4. 142 Working in the VBA editor Macro security, trust settings, switching to Excel 6 min
14 VBA and macros in Excel: FormatWizard 4 of 17 lessons · 19 min The first lines typed by hand: a variable that points the code at the right sheet, Option Explicit with declared types, a function that returns the number of the bottom row however long the file has grown, and a routine that wipes last run's flags and fills before a fresh check.
  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
  4. 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 loop running from the second row to the last that marks each row with no region, an If Else that adds a salesperson test and joins both messages in one flag cell, a light red fill on every empty cell, and IsNumeric marking an entry in a number column that cannot be read as a number. On a bordereau, region becomes handler and salesperson becomes cause of loss.
  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 Proof, then assembly: Debug.Print sends what the code reads to the Immediate window before anything is written, and one master macro calls every check in order, switches screen updating off for speed and reports an error in a message rather than 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.

Can Excel macros and VBA find every claim with no handler, no cause of loss or a note where the reserve should be, before I start working the file?

Yes, that is the check The Complete Excel Course with AI Integration from Coding Liquids has you build on FormatWizard, a validation project for a sales sheet, industry standard and designed after talking with people from many different industries. One macro reads a sheet of more than five thousand rows, writes the reason for every problem into a Flag column and colours each faulty cell light red. The lessons test for a missing region, a missing salesperson and an entry that cannot be read as a number where a figure belongs; on a bordereau those become a claim with no handler, a claim with no cause of loss and a reserve typed as TBC. A cell holding only spaces still counts as empty, because the test trims it first. The path here takes 1 hour 16 minutes across 17 lessons, from the first recorded macro to the master routine, and next week's file is then checked with a single click.

Formatting the weekly claims extract, checking each claim: which of these can the recorder handle, and which needs code?

The recorder takes the formatting and code takes the checking, and The Complete Excel Course with AI Integration teaches the two in that sequence. A macro is a recorded sequence of actions replayed with one click, so fixed steps suit it: bold headings, a fill on the row you are reviewing, the same layout every week, each captured as in Lesson 137 and Lesson 138. Recording cannot look at a value first, and Lesson 142 points out exactly that: the recorded code formats a row without checking that its amount is negative. Anything that depends on what a cell holds therefore needs VBA, the code underneath every recording: if the handler is blank, write a flag; if the reserve is not a number, colour it (Lesson 147 to Lesson 150). Letters, PDFs and emails to claimants sit outside these lessons; the formatting and checking that come first are covered end to end.

Can a recorded macro mark whichever claim row I am on, not just the row it was recorded on?

Yes, by recording with relative references, which The Complete Excel Course with AI Integration teaches in Lesson 138. A normal recording repeats the exact cells it saw, so the first macro of Lesson 137 formats the same row each time it runs. Switch on Use Relative References before recording and Excel follows your movement from the starting cell instead: the second macro formats whichever row the cursor sits in, and the lesson proves it on a different row from the one it was recorded on. In claims work that is one shortcut to mark the claim in front of you, bold with a fill, as referred or ready for review. Lesson 139 then puts the macro on a Quick Access Toolbar button. On a long bordereau, that single shortcut saves a run of clicks on every claim you mark.

Our claims workbook has several sheets: how does the macro know which one to check, and where the claims end?

It is told both in code, which The Complete Excel Course with AI Integration teaches in its first written lessons. Lesson 143 opens with the line that points the macro at one workbook and one sheet by name, stored in a variable, because code must know where it is working before it can do anything; a recorded macro, by contrast, acts wherever you happen to be. Lesson 145 then builds GetLastUsedRow, a function that is handed that sheet and searches upwards from the bottom for the last cell in use, so this week's bordereau is covered whether it holds two hundred claims or two thousand; the lesson adds a row and the answer moves on by one. Lesson 146 stops with a warning on a sheet with nothing but headings. On a workbook with a log, a payments listing and a diary, the check reads only the sheet you name.

Can the macro write why each claim was flagged, not just colour it?

Yes, and one flag cell can hold several reasons, which The Complete Excel Course with AI Integration builds in Lesson 148. The routine empties a text variable at the start of each row, adds a message for every check that fails, and writes the result into the Flag column with a pipe between messages, so one row reads both faults and another only one. Lesson 149 adds a soft red fill on the cells at fault: the colour shows where, the Flag column says what. Lesson 152 has the later number check add its message after a pipe instead of overwriting what is there. On a bordereau, a claim with no handler and no cause of loss carries both messages in one cell, and a filter on the Flag column becomes the list to return to whoever sent the file.

Once the course's checks work, can I add my own, for a missing loss date or policy number?

Yes, and the lessons show the exact move, because The Complete Excel Course with AI Integration extends its own macro the same way. Lesson 148 adds a salesperson test beside the region test inside the same loop, each failure adding its message to the row's flag; Lesson 149 copies the colour line from one check to the next and changes the column letter, with the warning that forgetting the change lights up the wrong column; and Lesson 150 brings in IsNumeric for an entry that cannot be read as a number. On a bordereau, a missing loss date or policy number is one more If inside the loop, one more message and one more colour line, and a paid column scattered with notes such as TBC gets the IsNumeric test. Lesson 152 then shows how a new routine joins the master macro with a single call.

After a colleague corrects the bordereau, will rerunning the check still show the old flags?

Every rerun starts from a clean Flag column, because The Complete Excel Course with AI Integration gives the clear-out a routine of its own in Lesson 146. It empties the Flag column from the second row to the last and removes the fill from the same range, so no message from an earlier run survives into the next. The lesson tests it by typing a note and a yellow fill into a flag cell by hand and running the routine again: both vanish. Lesson 152 then makes the clear-out the first call of the master macro, ahead of every check. So when a colleague has filled in the missing handlers and you press the button again, the Flag column speaks only for this run, and a claim put right no longer carries a message.

Can the whole check run from one button that anyone on the claims team can press?

Yes. The Complete Excel Course with AI Integration joins the checks into one master macro in Lesson 152, and Lesson 139 shows how to put a macro on a Quick Access Toolbar button, with the Developer tab switched on for running and editing. Lesson 140 saves the workbook as a macro-enabled .xlsm file, since a standard workbook drops the code when saved, and Lesson 142 explains the yellow bar that asks a user to enable content. Paste each week's bordereau into the sheet the code reads, and a colleague who has never opened the VBA editor checks it exactly as you would: same rules, same flags, same colours. That sameness is why a team keeps such a macro: it runs the same way every time, whoever presses the button.

Bordereaux arrive from brokers and outside administrators: is it safe to enable macros in their files?

Your check never depends on their code: in The Complete Excel Course with AI Integration the macro lives in your own workbook, and Lesson 142 teaches the rule for every other file. When a workbook with code opens, Excel holds its macros back behind a yellow bar until someone clicks Enable Content, and the lesson's advice is to click it only for files you trust. A bordereau is data, so it can arrive as an ordinary workbook or a CSV and be pasted into the sheet your macro reads, carrying no code of its own. Your macros stay in a macro-enabled file you created (Lesson 140), and the VBA editor of Lesson 141 lets you read every line before anything runs. With claimants' details inside those files, that habit is worth having.

A macro's changes cannot be undone with Ctrl+Z: what protects the bordereau while I test one?

Testing that reads before it writes, and The Complete Excel Course with AI Integration builds it into the section. Lesson 137 warns that Ctrl+Z cannot reverse a macro, and the lessons put their test rows back by hand afterwards, with Clear Formats and the date format restored. Lesson 151 adds the strongest safeguard: Debug.Print sends what the code reads to the Immediate window and writes nothing to the sheet, so you can confirm the right cells are read in the right order before a single flag appears. Lesson 146 gives the flags a reset of their own, so a check can always run again from clean. On claims, keep the bordereau exactly as it arrived, test on a copy saved as .xlsm (Lesson 140), and run the full macro only when the trial rows read correctly.

If an AI drafts the macro for our claims check, what must I be able to read in the code before it runs?

Four things, and The Complete Excel Course with AI Integration teaches each one on the macro you build. In Lesson 148 learners write parts of the routine with Claude or ChatGPT, each in its own window, and then correct what comes back. Correcting takes reading: whether the code finds the last row itself or stops at a fixed one (Lesson 145); whether a cell of spaces counts as blank, the trim inside the test of Lesson 147; whether the colour lands on the right column, since forgetting to change B to C lights up the wrong one (Lesson 149); and whether a second message is added after the first or overwrites it (Lesson 152). Debug.Print (Lesson 151) then shows what the draft reads before it writes a flag on a single claim.

Will Power Automate or Power Query make a claims macro pointless?

Your macro keeps its job, and The Complete Excel Course with AI Integration teaches all three tools so each does the work it suits. Power Query cleans an import with steps that rerun at every refresh and can combine a folder of extracts (Lesson 166). Power Automate Desktop drives Excel from outside: AutoFlow's flows open a workbook, read and write cells and loop over rows, and the challenge in Lesson 185 writes a flag beside the rows of one status, on Excel for Windows. The course is frank about the trade: a desktop flow working through more than a thousand rows one at a time is slow, a VBA macro usually runs faster, and a flow shows its logic visually with no code. For checking every claim inside the workbook, VBA stays the quick one, and the other two sit beside it.

Our bordereau runs to thousands of rows: will the check get through it quickly, and what if it fails halfway?

Quickly, and with a plain message if anything goes wrong, because The Complete Excel Course with AI Integration builds both into the master macro of Lesson 152. Screen updating goes off while the checks run, so Excel stops redrawing the sheet at every flag, and comes back on at the end. An error handler catches any fault, restores screen updating and shows the error's own description, instead of leaving whoever pressed the button inside the VBA editor. The FormatWizard sheet runs past five thousand rows, and the master macro gets through every one of them in a single run. Even the assembly is guarded: a misspelt routine name in the master macro shows up as a compile error before anything runs, and the lesson fixes it on screen.

I open a new bordereau every day: can my formatting macro come with me to each file?

Yes: a recorded macro can live in the Personal Macro Workbook, which The Complete Excel Course with AI Integration explains in Lesson 137. That hidden workbook opens with Excel on your computer, so a macro stored there is ready in every file you open, today's bordereau included, while the lesson's own macro is stored in its workbook to travel with it. Lesson 139 adds a macro to the Quick Access Toolbar, one click from any sheet, and the relative recording of Lesson 138 makes it act on whichever row you select. The full validation macro is different: its code names the sheet it reads (Lesson 143), so it stays in its own .xlsm workbook (Lesson 140) and the day's data is pasted in for checking. Formatting goes wherever you go; checking stays in one trusted file.

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.