The Complete Excel Course with AI Integration

Excel macros and VBA for tax accountants

Every client file that reaches a tax accountant needs the same pass before a return: blank tax numbers found, odd amounts caught, negative lines marked and the workpaper formatted, file after file, all season. The Complete Excel Course with AI Integration turns that pass into a macro you build yourself in FormatWizard, one of the industry-standard workbooks of the course, from a first recording through VBA loops and checks to one validation routine with 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 flagged row of a workpaper, give it a shortcut, and switch to relative references so one keystroke fixes whichever row you are on.
  • Run your macros from the Developer tab or a Quick Access Toolbar button, and keep them in an .xlsm workbook, the macro-enabled format, so they survive every save.
  • Open the VBA editor, read the code the recorder wrote, and handle macro security so that only files you trust are allowed to run code.
  • Write GetLastUsedRow, a VBA function that locates the final filled row, so every check covers a register of any length without a range to adjust.
  • Loop through every line with For Next and If, writing a message such as tax number missing into a flag column and colouring the empty cell.
  • Flag an entry in an amount column that Excel cannot read as a number, a word, N/A or a stray character, with IsNumeric, before a total quietly skips it.
  • Test what your code reads with Debug.Print in the Immediate window before it writes a single flag to a client's file.
  • Tie every check into one master macro that clears old flags first, runs each test in order and reports any error instead of crashing.

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 sales sheet of thousands of rows, it grows from a recorded formatting macro into a VBA tool that clears old flags, marks missing values, tests number columns and writes every problem into a flag column: the same pass a client's register needs before a return is prepared.

  • Project 13

    AutoFlow

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

    Built round a weekly sales report, it shows automation from outside the workbook: desktop flows that open, read, write and close Excel files. Set beside FormatWizard, it shows a tax practice which routine belongs in a macro and which in a flow.

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

Open the path at Lesson 136 if formulas are second nature but you have never recorded a macro: FormatWizard starts from the recorder and reaches finished VBA by its last lesson. Anyone who already records macros can pick it up at Lesson 141, where the editor opens, and someone who writes simple code can go straight to the checks from Lesson 146. For a reader still finding their way around Excel itself, the course's very first lesson, Lesson 1, and the formula sections after it come before any macro.

17 of 186 lessons · 1 h 16 min

14 VBA and macros in Excel: FormatWizard 5 of 17 lessons · 19 min Recording before coding: the idea of a macro and the FormatWizard sales sheet with its flag column, a first macro recorded with a name and a shortcut, relative references so it formats whichever row is selected, a Developer tab button and a Quick Access Toolbar icon, and the .xlsm format that keeps macros in the file. A credit note or a negative line on a workpaper gets one-keystroke formatting from here.
  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 5 of 17 lessons · 23 min Inside the editor: opened with Alt+F11 and toured, then the security settings and Enable Content for trusted files, modules, a first line of code that names its worksheet, variables under Option Explicit, a Sub set beside a Function, and GetLastUsedRow, which finds where any register ends.
  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
  4. 144 VBA variables and data types Sub vs function for Excel beginners 6 min
  5. 145 VBA functions in Excel Build GetLastUsedRow with find and exit function 5 min
14 VBA and macros in Excel: FormatWizard 7 of 17 lessons · 34 min The checking tool itself, on a sales sheet whose tests map straight onto a register's: old flags cleared, missing values caught by a For Next loop, two checks joined in one FlagText message, empty cells coloured with RGB, IsNumeric marking entries in a number column that are not numbers, Debug.Print in the Immediate window, and RunFullValidation running it all under an error handler.
  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
  6. 151 Debugging VBA for beginners Debug.Print and the Immediate window 5 min
  7. 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.

Is there more to Excel macros and VBA for a tax accountant than recording keystrokes, and where is the rest taught?

Much more, and The Complete Excel Course with AI Integration from Coding Liquids takes you through all of it in FormatWizard, whose industry-standard design came from talking with people in many different industries. Recording comes first: a macro that formats a row with a negative amount, run by shortcut, by button and with relative references (Lesson 137 to Lesson 139). Then the real work starts in the VBA editor: variables, GetLastUsedRow to find where the data ends, For Next loops, If and Else, IsNumeric checks, cell highlights, Debug.Print output and an error handler, ending in one macro that audits a whole sheet (Lesson 152). The lessons check a sales sheet for missing regions, missing salespeople and invalid per-unit figures; a client's register needs the same tests on tax numbers, invoice numbers and amounts. The 17 lessons on this page, 1 hour 16 minutes of video, carry you from that first recording to the finished checking tool.

Can a macro mark each register line that lacks a supplier tax number or an invoice number, and say which is missing?

Yes: that is exactly the check The Complete Excel Course with AI Integration has you write, column for column. Lesson 147 loops through every row with For Next and writes a message in the flag column wherever a region cell is empty, with Trim making sure a cell holding only spaces counts as empty too. Lesson 148 tests two columns in the same pass and builds the message in a FlagText variable, so a row missing both carries both messages, joined by a pipe, and Lesson 149 colours each empty cell light red, using Interior.Color set to an RGB mix. Swap region and salesperson for the supplier's tax number and the invoice number, and the macro hands you a register marked line by line before the return begins: what is missing, and on which row. A reviewer then reads one flag column instead of scanning thousands of lines by eye.

A client's amount column holds N/A, TBC and stray characters: can VBA find them before a total goes wrong?

Yes: Lesson 150 of The Complete Excel Course with AI Integration writes that check with IsNumeric. Its loop runs down a number column, the per-unit figure in the lesson's sales sheet, asking of every entry whether Excel can treat it as a number; each refusal turns the entry and its flag cell light red, with a note that the value is invalid. Text where a figure belongs, a placeholder such as N/A or TBC, a stray symbol: each one is marked on its own row. In a client's register, point the same test at the net, tax and gross columns and every unusable entry shows itself before a SUM silently leaves it out. Lesson 152 then makes this check add its message after any earlier ones, so a line with a missing tax number and a bad amount carries both.

A macro cannot be undone: how do I keep a client's file safe while one runs?

By building safeguards into the routine, as The Complete Excel Course with AI Integration does from the very first recording. Lesson 137 makes the point plainly: Ctrl+Z cannot reverse what a macro has done. So the course practises on its own starter file with the finished workbook beside it, and the habit to carry into client work is to run every new or changed macro on a copy first. Lesson 151 adds Debug.Print, with its output in the Immediate window, so the code can report what it reads, row by row, without writing anything to the sheet, so a mistake is caught before it spreads over hundreds of lines. Lesson 146 wipes earlier flags and fill colours before each run, so old messages never mix with new ones. And Lesson 152 wraps the whole routine in an error handler that says what went wrong in a message instead of crashing.

Where should the checking macros live so they work on every client's register: in each file or in one master workbook?

In one master workbook, with each client's register brought to it, a routine The Complete Excel Course with AI Integration equips you for. Lesson 140 saves the work as a macro-enabled .xlsm, since a plain .xlsx drops every macro, and Lesson 143 shows the code reaching its data by naming the workbook and the sheet it works on, so the checks always know where the register sits. Lesson 145 builds GetLastUsedRow, which finds the last filled row whatever the length, so one loop covers a client with a short listing and one with a year of invoices, and Lesson 146 clears the previous client's flags before each run. For the recorded formatting macros, Lesson 137 introduces the Personal Macro Workbook, which keeps them on hand whenever Excel opens. Keep the column order fixed and one tool serves the whole season.

Is VBA still worth a tax accountant's time now that Power Query, Power Automate and AI tools exist?

Yes, because it does a job the others do not, and The Complete Excel Course with AI Integration teaches all of them so you can pick by task. VBA works on the cells of the open workbook: it reads each line, writes a message beside it, colours what is wrong and formats what is right, in one click (Lesson 152). Power Query, in the SalesFusion lessons, is the tool for importing and reshaping a download every period. Power Automate Desktop, in AutoFlow, opens files and moves data between them, though the course itself notes that a VBA macro usually runs faster over many rows (Lesson 185). AI drafts code, as Lesson 148 shows when learners have Claude or ChatGPT draft parts of a macro and then put right what comes back, and knowing VBA is what lets you make those corrections. For checking registers before a return, a macro stays the most direct route.

My formulas are solid but I have never written code: how do the lessons get me writing VBA?

Through the recorder first, so your first VBA is written for you. In The Complete Excel Course with AI Integration you record a formatting macro in Lesson 137, then open the VBA editor with Alt+F11 in Lesson 141 and read the code the recorder produced. From there each step is small: a first line that points to the worksheet (Lesson 143), then variables and Option Explicit, which stops typing slips from turning into bugs, and how a Sub, which acts, differs from a Function, which hands back a result (Lesson 144), before loops and If tests on real columns. Every lesson ends with code that runs and changes something you can see on the sheet. Your formula habits help more than you expect, since an If in VBA reads much like IF in a cell. The shortcuts shown are the Windows ones, and on a Mac the same steps sit on slightly different screens.

Can a recorded macro format a workpaper the same way for every client?

Yes, and with relative references it formats whichever row you choose. Lesson 137 of The Complete Excel Course with AI Integration records a macro that makes a row with a negative amount bold, italic and highlighted, names it, gives it a Ctrl shortcut and runs it again on demand. Recorded that way it always formats the same fixed row, so Lesson 138 switches on Use Relative References: the second macro follows your movement from the active cell, and one keystroke formats any problem row you select, the real test being a row the recording never touched. On a tax workpaper that means a credit note, a refund or a negative balance marked identically on every client's file, and any other formatting routine you repeat can be recorded the same way. Lesson 139 then puts the macro on a button in the Quick Access Toolbar.

Can junior staff run the checks without ever opening the code?

Yes: a button and one master macro are all they need, and The Complete Excel Course with AI Integration builds both. Lesson 139 adds the Developer tab and puts a macro on the Quick Access Toolbar with an icon of its own, so running it is a single click. Lesson 152 gathers every check into RunFullValidation, which clears old flags, runs each test in order, turns screen updating off for speed and ends with a success message, so the person pressing the button sees a clear result rather than code. If something fails, the error handler shows a plain description instead of dropping them into the editor. In a practice that splits the work sensibly: whoever knows VBA maintains the tool, and everyone preparing returns runs it on each client's register before the real work begins.

What happens when a macro stops with an error halfway through a client's register?

You read the error and fix it, which The Complete Excel Course with AI Integration practises on real failures. Several lessons meet an error and resolve it on screen: a missing End With in Lesson 142, a variable used without its Dim, caught by Option Explicit, in Lesson 150, and a misspelt call in Lesson 152. The Immediate window, fed by Debug.Print (Lesson 151), reveals which cells the code reads at each step, so you can see where it went astray. The finished macro also carries an error handler: On Error GoTo sends any problem to a block that switches screen updating back on and shows the error's description, so the routine ends with an explanation instead of crashing. Fix the cause, clear the flags with the routine from Lesson 146, and run the checks again from the top of the register.

How long a register can the checking macro work through?

As long as your sheet goes, because the macro measures the data before it loops. Lesson 145 of The Complete Excel Course with AI Integration builds GetLastUsedRow, a function that searches upwards from the bottom of the sheet for the last filled row and hands its number back, guarded by a COUNTA test for an empty sheet; the loops of the later lessons then run from the first data row to that one. The lesson proves it on a sales sheet of thousands of rows: add one more row and the answer moves with it. Lesson 152 switches screen updating off while the checks run, which speeds a long pass, and turns it back on at the end. For a client's year of invoice lines that means no range to adjust and no row left unchecked, whether the register holds a few hundred lines or many thousands.

Is it safe to open a client's workbook that contains macros?

Yes: the trust settings in The Complete Excel Course with AI Integration keep you in charge of what runs, and they come before any code is written. Lesson 142 deals with macro security: the yellow bar that says macros have been disabled, Enable Content, and the trust settings behind them, with the rule to enable content only for files you trust. A client workbook you did not expect to carry code can stay disabled until you have looked inside, and Lesson 141 has already shown how: the Project Explorer in the VBA editor lists every module, so you can see what a file holds before letting it run. Your own tools are saved as .xlsm files (Lesson 140), which tells anyone receiving them that code is inside. For a practice handling client data, that habit of checking before enabling is worth the lessons on its own.

Should a register check be a macro or a conditional formatting rule?

Both earn a place, and The Complete Excel Course with AI Integration teaches each. Conditional formatting colours a cell the moment it meets a rule and keeps doing so as the data changes: highlight rules, data bars and icon sets in Lesson 15, and rules for overdue and completed tasks in TaskFlow (Lesson 82). A macro runs when you press its button and leaves a written record: Lesson 148 writes the reason for each flag beside the row, and Lesson 149 colours the empty cells as well. For tax work the split is practical. A live highlight suits a working register you fill in through the period; a macro suits the pass before a return, when you want every problem listed in a column a reviewer can filter, sort and sign off, and the same tests run identically on every client.

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.