The Complete Excel Course with AI Integration

Excel macros and VBA for BI analysts

BI work ends in Excel more often than dashboards admit: extracts to check before they feed a model, reports to format for business teams, the same clicks every week. The Complete Excel Course with AI Integration automates that last mile on FormatWizard, an industry-standard project, and this page picks out its whole macro section: recorded macros and buttons first, then VBA that loops through every row, flags and colours faults and runs as one checked routine.

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 formatting a report needs every week as a macro, with absolute or relative references, and run it from a shortcut, the Developer tab or a Quick Access Toolbar button.
  • Save report tools as macro-enabled .xlsm workbooks and tell business users when pressing Enable Content is safe.
  • Write VBA under Option Explicit that names its worksheet, declares its variables and finds the last used row through a reusable function, so a check covers an extract however long it grows.
  • Loop through an extract with For Next and If Else, writing a message for every missing key value into a flag column and colouring the faulty cells with RGB.
  • Flag entries in a number column that are not numbers at all, a word, a note or a stray character, before they reach a total or a model.
  • Confirm with Debug.Print and the Immediate window that code reads the right cells in the right order before it writes a single flag.
  • Gather every check into one master macro that clears old flags, runs each routine in order with screen updating off and reports any error instead of crashing.

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.

    The course's macro project, on a sheet of sales orders some five thousand rows long: recorded formatting first, then a VBA engine that clears old flags, tests every row and colours each fault. Point the same engine at the key and amount columns of your own extract and it becomes the check your figures pass before anything is reported.

  • Project 13

    AutoFlow

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

    Built for a weekly sales report, it is the course's Power Automate Desktop project and the clearest contrast to a macro: the same open, loop, read, test and write logic, drawn as a visual flow with no code, so you can judge for each routine whether a macro or a flow should own it.

  • Project 12

    SalesFusion

    A sales report that refreshes itself from a folder of files.

    Built on a folder of messy sales exports, it is the course's Power Query and data model project: the clean-up a macro would hard-code becomes query steps that rerun at every refresh, which leaves VBA free for the checks and formatting a query cannot do.

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: recorded macros come first and pay off at once, and the code builds on them. Already recording macros and running them from buttons? Open the editor at Lesson 141. Comfortable in VBA and here for the checks? The validation engine starts at Lesson 146. If Excel itself is new, begin at Lesson 1, because the macros format and test worksheets you will want to know well first.

17 of 186 lessons · 1 h 16 min

14 VBA and macros in Excel: FormatWizard 5 of 17 lessons · 19 min Macros before code: what macros and VBA are, a first recording with absolute references that formats a row with a negative amount, the same job recorded with relative references so it follows the selected row, the Developer tab with a macro on the Quick Access Toolbar, and the .xlsm format that keeps every macro on saving. Enough to take a report's weekly formatting off your hands straight away.
  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 Into the code: the VBA editor and the ways to open it, macro security and trust settings, a first line that points at the Data sheet through a variable, Option Explicit and declared data types, a Sub set against a Function, and GetLastUsedRow, a function built with Find that tells every later routine where the data 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 engine an extract needs before it is reported: old flags and fills cleared before each run, a For Next loop that flags missing regions, If Else tests that add missing salespeople to a FlagText message, RGB fills on the faulty cells, IsNumeric on the per-unit figures, Debug.Print in the Immediate window, and RunFullValidation, one master routine behind 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.

Which Excel macros and VBA course fits a business intelligence analyst who automates the last mile of reporting?

The Complete Excel Course with AI Integration from Coding Liquids fits that brief, through FormatWizard, an industry-standard macro project designed after talking with people from many different industries. Its raw material is familiar ground for a BI analyst: a long sheet of sales orders with gaps and bad entries, and the same formatting and checks wanted every time it arrives. You record the formatting first, then write VBA that walks every row, flags each missing or invalid entry in a column of its own, colours the faulty cells and runs as one master macro with an error handler. The whole macro section sits on this page, 17 lessons and 1 hour 16 minutes from the first recording to that master routine. The starter file and the finished macro-enabled workbook both come with the course, so every routine you write can be set beside a working one.

Is VBA still worth a BI analyst's time when Power Query and Power BI do so much?

Yes, for the work those tools leave in Excel, and The Complete Excel Course with AI Integration teaches all three so each does its own job. Power Query cleans an import the same way at every refresh (Lesson 154 introduces it), and a model reports on the result, but neither acts on the sheet a business team hands you or opens from you. A macro does: it writes a message beside a faulty row (Lesson 148), colours a cell (Lesson 149), formats a report the house way in one keystroke (Lesson 137) and runs from a button a stakeholder can press (Lesson 139). Splitting a report into a file per region and emailing each one is not among the lessons; the checks, formats and buttons that come before any report leaves are. That last mile, between the BI stack and the people who still work in spreadsheets, is where VBA keeps its place.

What is replacing Excel macros, and does the course teach the replacements as well?

Two tools take over parts of their work, and The Complete Excel Course with AI Integration teaches both beside VBA, so you choose by the job. Power Query replaces the cleaning macro: steps recorded once in a query and replayed on every new file, a whole folder of them included (Lesson 166). Power Automate Desktop replaces the routine that spans apps: a flow that opens a workbook, reads it, tests each row and writes back (Lesson 185). The course is open about the trade. Where a macro records VBA, a flow records visual steps you can inspect, edit and share without code (Lesson 181), while a macro usually runs faster over many rows. Office Scripts are not part of the course. On the desktop, all three tools end up in your hands, so every routine in a reporting week has one that fits it.

Can a macro check the weekly extract before it reaches my dashboard or data model?

Yes, and that is exactly the engine The Complete Excel Course with AI Integration has you build. On FormatWizard's sales sheet, a cleanup routine first clears the old messages and fills from the flag column (Lesson 146). A For Next loop then walks every row and writes Region missing wherever the region is blank, with Trim making sure a cell of spaces still counts as empty (Lesson 147). The next lessons add the salesperson to the same pass with a FlagText message that names every fault in a row (Lesson 148), colour each faulty cell a soft red (Lesson 149) and flag entries in a number column that are not numbers at all, a word, a note or a stray character (Lesson 150). Swap the column letters for your extract's key and amount columns, and the same macro becomes the pre-flight check your figures pass before anyone reports them.

Can a recorded macro take over the formatting I redo on every report?

Yes, from the opening lessons of The Complete Excel Course with AI Integration. Lesson 137 records a macro that formats a row bold, italic and highlighted, names it without spaces, gives it a Ctrl shortcut and stores it in the workbook; you also meet the Personal Macro Workbook, which keeps a macro ready whenever Excel opens on your computer. A recording with absolute references always formats the same row, so Lesson 138 records again with relative references and the macro follows whichever row you start from, the difference between a fixed template and a tool for any report. One caution comes early: Ctrl+Z cannot undo a macro, so test it on a copy. Then Lesson 142 shows where recording stops: the code formats a row without checking that its amount is negative, which is why the course goes on to write logic.

Can I give business users a one-click button instead of a page of instructions?

Yes: The Complete Excel Course with AI Integration puts your macros on a button and teaches what the person pressing it needs to know. Lesson 139 turns on the Developer tab through Excel's options, runs macros from it and adds one to the Quick Access Toolbar with an icon of its own, so a check or a format is a single click for anyone using the file. Lesson 140 saves the workbook as .xlsm, because a standard .xlsx drops every macro on saving, and the first save of a file with code needs Save As. Then Lesson 142 covers the yellow bar that says macros have been disabled: Enable Content lets the code run, and it is pressed only for files you trust. Hand a stakeholder a tool built this way and the instructions shrink to one line: open it, enable it, press the button.

Can I have ChatGPT or Claude draft the checking macro for our extracts, and still trust what it wrote?

Yes, once you can read and test the draft, and The Complete Excel Course with AI Integration trains both halves. In Lesson 148 learners write parts of the FlagText macro with Claude or ChatGPT, each in its own window, and then correct what comes back, so judging an assistant's VBA is practised on real code. The safeguards follow: Option Explicit forces every variable to be declared, catching the typos assistants and people both make (Lesson 144); Debug.Print shows in the Immediate window which cells the code reads, and in which order, before it writes a flag (Lesson 151); and an error handler reports a failure instead of leaving a half-run macro behind (Lesson 152). An assistant saves typing, but knowing the language is what lets you sign off a macro that touches every row of a report.

My extracts run to thousands of rows: how does the course keep a macro fast and safe on them?

With the habits a long sheet demands, each taught on FormatWizard's data in The Complete Excel Course with AI Integration. GetLastUsedRow (Lesson 145) searches upwards from the bottom with Find to return the last row in use, guarded against an empty sheet, so every loop covers the data exactly and grows with it: add a row and the next run reaches it. The cleanup routine stops at once on a sheet that holds only headers (Lesson 146). The master macro turns screen updating off while it works, which speeds the run, and its error handler turns it back on and shows what went wrong (Lesson 152). The same lesson fixes a quiet fault worth knowing on any shared flag column: two routines writing to one cell must add to it after a separator, or the second erases the first.

I can read a DAX measure but have never opened the VBA editor: where does the course start me?

At the recorder, before any code, and The Complete Excel Course with AI Integration climbs from there in small steps. You record and run macros first (Lesson 137), then open the editor with Alt+F11 and learn its parts: the Project Explorer, modules as containers for code and the code window holding what you recorded (Lesson 141). The first line you type points VBA at the Data sheet through a variable, explained as a nickname for a long name (Lesson 143). Variables, data types and the difference between a Sub, which does a job, and a Function, which hands back an answer, come next (Lesson 144). A DAX writer starts with an advantage, because you already write exact logic against named tables and columns, so a For Next loop over an extract soon reads naturally.

Colleagues will open my macro workbook on their own machines: what do they need to know?

Three things, and The Complete Excel Course with AI Integration teaches each before you hand anything over. The file must be saved as an Excel Macro-Enabled Workbook, .xlsm, because the standard .xlsx strips the code out on saving (Lesson 140). On opening, Excel disables the macros behind a yellow bar, and Enable Content is the click that allows them, kept for files whose source you trust (Lesson 142). And a macro stored in your Personal Macro Workbook lives on your computer rather than in the file, so a tool meant for others belongs in the workbook itself (Lesson 137). Colleagues on a Mac can run it too, since the course's requirements name Windows only for Power Pivot and Power Automate, though the lessons are shown on Windows and Excel on the web runs no VBA at all.

Can I write my own VBA functions for business rules my formulas cannot express?

The Complete Excel Course with AI Integration teaches you to write VBA functions of your own and reuse them across every macro in a workbook. Lesson 144 sets the rule: a Sub performs an action, a Function hands a result back to whatever called it. Lesson 145 then builds one, GetLastUsedRow, with Find, a guard that exits early on an empty sheet, and a return value every later routine relies on, and Lesson 146 makes it Public so other modules can call it. A business rule fits the same pattern: written once as a function, called wherever a macro needs the answer, and changed in one place when the rule changes. The lessons use their functions inside macros; a custom function typed into a worksheet cell is written with the same Function syntax, but it is not a lesson of its own.

Can a macro run the steps before a report goes out, a refresh among them, in the right order?

The Complete Excel Course with AI Integration teaches the shape every such macro takes: one master routine that calls the others in order. RunFullValidation in Lesson 152 clears old flags, runs the two-column check and then the number check, with screen updating off for speed, an error handler that reports a failure and a closing message when all is done. A pre-send routine for a BI report is the same sequence with different steps in it. Refreshing is taught as Excel's own Refresh All (Lesson 65), and the macro recorder of Lesson 137 captures the clicks you make while recording as lines of code, that one included; refresh code written from scratch is not a lesson. Put together, the pieces give you a single button that runs a report's whole closing routine and tells you whether it succeeded.

The extract lands every Monday: how far into the path before a macro is checking it for me?

Recorded formatting is useful from the first evening; the full check takes the whole path, 1 hour 16 minutes, and The Complete Excel Course with AI Integration lets you put each part to work as it arrives. By Lesson 140 your report formatting runs from a button in a saved .xlsm file. The checking engine begins at Lesson 146, and by Lesson 147 a loop is already flagging blanks in a key column of your own Monday extract. The rest adds the second check, the colours, the number test, the debugging and the master routine with its error handler. FormatWizard's starter file and its finished, macro-enabled version come with the course, so each routine can be compared with a working one before it touches real data, and lifetime access keeps every lesson ready for the next tool you write.

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.