The Complete Excel Course with AI Integration
Excel macros and VBA for procurement officers
Every week a purchase export is formatted and checked before anyone reports from it: lines with no supplier code, quantities typed as words, the same tidy-up done by hand. The Complete Excel Course with AI Integration hands that routine to macros and VBA on FormatWizard, an industry-standard project, and this page picks out the lessons: recording and buttons, the VBA editor, a last-row function, loops that flag faults, IsNumeric, colour, debugging and an error handler.
Taught by Sagnik Bhattacharya and Virginia Thorn
What you will be able to do
At work, you will be able to:
- Record the weekly formatting of an open-orders or expediting report once, with relative references so it follows whichever line you start from, and run it from a button on the Quick Access Toolbar.
- Save the workbook in the macro-enabled .xlsm format and know the trust settings a colleague meets on opening it.
- Write VBA under Option Explicit that finds the last line of a purchase export with a GetLastUsedRow function, however many lines arrived this week.
- Loop through every purchase line with For Next and flag the ones missing a supplier code or a buyer's name, with all of a line's faults gathered into one message.
- Catch a word or a note such as N/A in a quantity, per-unit or amount column with IsNumeric, and colour each faulty cell with Interior.Color and RGB.
- Clear the previous run's flags and fills before each check, so last week's warnings never mix with this week's.
- Watch what the code reads with Debug.Print in the Immediate window, then run every check from one subroutine behind an error handler that reports what went wrong.
- Read and correct a macro drafted by ChatGPT or Claude before it is let loose on the order log.
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.
For a buyer, the check that runs before a spend report goes anywhere: every purchase line read for a missing code, a missing name or a word where a number belongs, each fault written beside its line and coloured, and the old flags cleared before the next run.
-
Project 12
SalesFusion
A sales report that refreshes itself from a folder of files.
Where a recurring export is cleaned rather than checked: Power Query fixes text, dates and data types once and stacks a folder of same-layout files, returned bid sheets among them, so the macro has clean lines to inspect.
-
Project 07
TaskFlow
One sheet that shows what is done, what is late and what is urgent.
The colour-rule route to date alerts: overdue rows highlighted, working days left to each deadline counted with NETWORKDAYS and TODAY and the sheet protected, a simpler tool than a macro for contract end dates and promised deliveries.
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 can enter data and write a simple formula; nothing in the section assumes you have programmed. Recording macros already? Go to Lesson 141, where the VBA editor opens, or to Lesson 146 if you can read code and want the checks. New to Excel? Begin at Lesson 1 and arrive here with tables and formulas in hand. On a Mac you can follow every lesson, though a few screens look different and the keyboard shortcuts shown are the Windows ones.
17 of 186 lessons · 1 h 16 min
14 VBA and macros in Excel: FormatWizard Macros before code, for the formatting a buyer repeats every week: what a macro is and what FormatWizard becomes, a first recording named and run from a shortcut, relative references that let it work from any line, the Developer tab and a button on the Quick Access Toolbar, and the macro-enabled .xlsm format that keeps it.
- 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 Into the code: the VBA editor opened with Alt+F11, macro security and trust settings, a first module that points at a worksheet, then variables and data types, a Sub against a Function, and GetLastUsedRow, which finds the end of an export whatever its length this week.
- 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
- 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 a purchase export needs, one to a lesson: old flags and fills cleared, a For Next loop that flags every missing value, If and Else tests that gather a line's faults into one message, Interior.Color and RGB for the cell at fault, and IsNumeric for an amount or a per-unit figure that is not a number. The lessons check region and salesperson; supplier code and buyer take their place.
- 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 and a finish: Debug.Print and the Immediate window show what the code reads before it writes anything, then one subroutine runs every check behind an error handler that reports what went wrong instead of stopping cold.
- 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.
Excel macros and VBA for procurement officers: what can they automate, and how far does a course take me?
Two kinds of weekly chore, and The Complete Excel Course with AI Integration from Coding Liquids takes you the whole way through both on FormatWizard, an industry-standard project designed after talking with people from many different industries. The first is formatting: record it once and replay it from a button, with no code at all (Lesson 137 to Lesson 140). The second is checking: VBA you write yourself reads every line of an export, flags a missing code or a word where a number belongs, colours the cell at fault and reports when it has finished (Lesson 146 to Lesson 152). The lessons check sales records; a purchase order export has the same kind of columns and the same kind of faults. The 17 lessons on this page come to 1 hour 16 minutes of video. The course's requirements name Windows only for Power Pivot and Power Automate, so these lessons are open to a Mac too.
Some purchase lines reach me without a supplier code or a buyer's name: can VBA mark every one?
Yes, every line, however long the export runs. The Complete Excel Course with AI Integration builds the check in three steps. Lesson 145 writes GetLastUsedRow, a function that searches up from the bottom of the sheet for the last filled row, so the macro neither stops short nor runs past the end when this week's export is longer than last week's. Lesson 147 sends a For Next loop down the rows that writes a flag wherever the region cell is empty, trimmed first so a cell holding only spaces still counts as empty. Lesson 148 adds a second test, for a missing salesperson, and gathers both faults into one FlagText message per row, separated by a pipe. Read region as supplier code and salesperson as buyer and you have the check an order export needs, with Lesson 149 colouring each empty cell a soft red.
The warehouse keys goods received into a shared log, and words like N/A turn up in the quantity column: will a macro catch them?
Yes: IsNumeric is the test for exactly that, and The Complete Excel Course with AI Integration builds it in Lesson 150. The macro walks every row and asks of one column whether each entry can be treated as a number; where it cannot, whether a word, a note such as N/A or a stray character, it colours that cell and its flag cell light red and writes that the entry is invalid. The lesson aims it at the per-unit figure; aim it at quantity received, the amount or any other number column of your log by changing one column letter. Catching these before anyone totals the log matters, because SUM steps over text without a warning and the total simply comes out short. Option Explicit, set at the top of each module from Lesson 144, then stops a mistyped variable name from slipping through the check unseen.
Every Monday I bold, colour and tidy the expediting list by hand: can a recorded macro do it?
Yes, with no code at all, and The Complete Excel Course with AI Integration shows how in the opening lessons of the section. Lesson 137 records a macro while you format a row, names it, gives it a keyboard shortcut and stores it in the workbook; run it again and the formatting repeats in one keystroke. Recorded that way it always returns to the same cells, so Lesson 138 switches on Use Relative References, and the macro then formats whichever line you start from: select the next late order, press the shortcut, done. Lesson 139 switches on the Developer tab and adds the macro to the Quick Access Toolbar as a one-click button, and Lesson 140 saves the file as a macro-enabled .xlsm so nothing is lost. One warning from the lessons worth keeping: Ctrl+Z cannot undo a macro, so try a new one on a copy first.
Before the weekly supplier review, can one click run every check and tell me if something breaks?
Yes: that is how FormatWizard ends, and The Complete Excel Course with AI Integration builds it in Lesson 152. RunFullValidation calls the routines you have written in order: it clears the old flags and fills first (Lesson 146), then runs the checks for missing values and for entries that are not numbers. Screen updating is switched off while it works, which speeds the run, and on again at the end. If anything fails, an error handler steps in, restores screen updating and shows the error's description in a message, rather than leaving a half-checked sheet and a cryptic halt. The lesson also fixes a trap worth knowing: two routines writing into one flag cell must add to it after a pipe, or the second wipes out the first. Put the macro on a button and the review file is checked in seconds.
ChatGPT wrote me a macro that flags late orders: how would I know it reads the right column?
By reading and testing it the way The Complete Excel Course with AI Integration teaches, which is the strongest reason to learn VBA today. Lesson 148 has you write parts of a macro with Claude or ChatGPT and correct what comes back, so checking an assistant's code is practised, not just advised. Then the tools: Lesson 151 prints what the code is reading into the Immediate window with Debug.Print, each row number beside its value, so before anything is written you can see whether it is looking at the delivery date or the order date. Lesson 149 shows the commonest slip, a column letter copied and never changed, which lights up the wrong column. Option Explicit catches a mistyped name (Lesson 144). The lessons check missing and non-numeric entries rather than dates; the reading and testing carry to any macro an assistant drafts.
Is anything replacing Excel macros, or is VBA still worth a procurement officer learning?
VBA is still the language behind macros in desktop Excel, and The Complete Excel Course with AI Integration teaches it beside the tools around it, so you pick by the job rather than by fashion. Office Scripts serve Excel on the web, where VBA does not run, and they are not part of the lessons. Power Automate Desktop drives Excel from outside, on Windows, and the course builds it in AutoFlow from Lesson 174; its Ninja Challenge notes that a VBA macro usually runs faster over many rows, while a flow shows its logic visually (Lesson 185). Power Query takes on the clean-up of exports that return every month (Lesson 154). And AI now drafts code, which makes reading it worth more, not less. A buyer who knows VBA checks a whole order export in one click, on Windows or a Mac, with nothing to install.
Can VBA merge a stack of supplier bid sheets into one comparison table?
The course gathers them with Power Query and then lets VBA check the result, each tool doing the part it does well. The Complete Excel Course with AI Integration teaches From Folder in Lesson 166: every file in a folder is stacked into one table with a column naming the file each row came from, cleaned by steps you set once, and a bid sheet that arrives later joins at the next refresh. That works when suppliers return the same template, which is the reason to send one. The FormatWizard checks then run on the combined table: blanks flagged, entries that are not numbers caught, faults coloured (Lesson 147 to Lesson 150). Ranking the bids is formula work, and SORT and SORTBY (Lesson 77) list them from the lowest total up. A VBA loop that opens workbooks one by one is not taught; for files of one layout the folder query needs no code.
Suppliers and finance colleagues receive my workbooks: what happens to the macros when I send them?
They travel only in the right file type, and The Complete Excel Course with AI Integration covers both ends of the trip. Lesson 140 shows the trap first: save a workbook holding code as an ordinary .xlsx and every macro is stripped out, so the first save needs Save As and the macro-enabled .xlsm format. On the receiving side, Lesson 142 explains macro security: a yellow bar reports that macros have been disabled, and Enable Content is for files you trust, the rule to pass on to anyone you send code to. A colleague on a Mac can run the same macros, since the course's requirements name Windows only for Power Pivot and Power Automate. For a macro you want in every workbook on your own machine, Lesson 137 points to the Personal Macro Workbook, a hidden file that opens whenever Excel does.
Should contract expiry and reorder alerts be a macro or a colour rule?
Usually a colour rule, and The Complete Excel Course with AI Integration teaches both so the choice is yours. A date alert has to stay live as the days pass, and conditional formatting does that by itself: TaskFlow highlights overdue rows (Lesson 82) and counts the working days left to each deadline with NETWORKDAYS and TODAY (Lesson 85), recalculating whenever the file opens. Aim the same kind of rule at contract end dates, or at stock set against a reorder level, and the warnings appear without a click. A macro earns its place when the check is a sweep you run on demand and want written down: FormatWizard's loop walks every row, tests it, writes a flag beside each fault and colours the cell (Lesson 147 to Lesson 149). Reminder emails are part of neither; the alert itself, a colour or a written flag, is yours from these lessons.
I live in SUMIFS and XLOOKUP, not code: which of my Excel habits carry over into VBA?
More than you would expect, and The Complete Excel Course with AI Integration builds on them. An If statement in VBA chooses between outcomes just as the IF function chooses between results, and the If and Else pair of Lesson 148 reads like IF with both of its answers filled in. A For Next loop (Lesson 147) does to every row what you do when you fill a formula down a column. The recorder's absolute and relative references (Lesson 137, Lesson 138) are the same idea as a reference locked or left free in a formula. A function you write, GetLastUsedRow (Lesson 145), hands back a result as a worksheet function does, and it even calls COUNTA inside. Debug.Print shows what the code sees, much as the formula bar shows a cell (Lesson 151). What is new is small: declaring variables under Option Explicit and reading a module from top to bottom.
Is there a free download or PDF of procurement macros I could use instead of a course?
Downloads exist; what The Complete Excel Course with AI Integration gives you is a macro you understand and can change, plus the files to build it. FormatWizard comes with a starter workbook of sales records and the finished macro-enabled workbook holding every routine, so your code can be set beside a working version line by line. Change the columns it checks and the finished file becomes the first validation tool for your own order export. A downloaded macro you cannot read is a risk in a workbook full of supplier spend: the course's own advice in Lesson 142 is to enable content only for files you trust, and trust comes from knowing what the code does. The course page also has free lessons to watch before you buy, and a quiz at the close of the section confirms what stuck.
Can a macro clean up the ERP export itself: blank rows, text dates and a code and name sharing one column?
Three tools share that job in The Complete Excel Course with AI Integration, each taught where it belongs. A recorded macro replays formatting in one click (Lesson 137). FormatWizard's VBA then finds what is missing or not a number and flags it line by line (Lesson 147 to Lesson 150). The deep clean of an export that comes back every month belongs to Power Query: text trimmed and set in one case, true dates and numbers fixed as data types, and dates given month and year columns, all saved as steps that run again on next month's file (Lesson 157 to Lesson 159). A code and a name packed into one column split apart with Text to Columns (Lesson 25). Used together, the export arrives clean, gets checked and leaves formatted, and nothing in it is retyped by hand.
How many evenings before a macro is checking our purchase export, and what do I keep at the end?
About 1 hour 16 minutes of video in short lessons that fit around a working week, and the first useful macro arrives early. By Lesson 140 of The Complete Excel Course with AI Integration a recorded macro formats your report from a button and lives in a macro-enabled file. The checks come one idea a lesson after that, and by Lesson 152 a single subroutine clears old flags, finds the last line, flags every missing code and every non-number, colours each fault and reports any error. Typing the code yourself and pointing it at your own export takes longer than the video, and that is the part that makes the skill yours. You keep the finished FormatWizard workbook, lifetime access to every lesson for the next chore you want gone, and a Certificate of Completion with a verification link once you complete the course.
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 procurement officers
- XLOOKUP and VLOOKUP for procurement
- Pivot tables for procurement
- Charts for procurement officers
- Excel dashboards for procurement
- Conditional formatting for procurement
- Data cleaning for procurement
- Data validation for procurement
- Excel tables for procurement
- Text functions for procurement
- Date functions for procurement officers
- Dynamic arrays for procurement officers
- Power Query for procurement officers
- Power Pivot and DAX for procurement
- Power Automate for procurement
- Copilot in Excel for procurement
- ChatGPT for Excel for procurement
- Claude in Excel for procurement