The Complete Excel Course with AI Integration

XLOOKUP and VLOOKUP for government officers

Government files are joined by codes: an employee ID on a roster, a beneficiary number on a payment list, a budget code on a return. The Complete Excel Course with AI Integration teaches the lookups that join them, hands-on in industry-standard projects, and this page picks out the lessons for that work: clean keys, VLOOKUP and XLOOKUP, messages for missing IDs, INDEX and MATCH, codes split into parts, spilled lists by district and a merge for whole returns.

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:

  • Pull a name, grade, duty station or budget head across from a master sheet with VLOOKUP and an exact match, the table range locked before the formula is filled down.
  • Use XLOOKUP to search left or right, return a message such as Not on register when an ID is missing, and find the value where a row and a column meet with a two-way lookup.
  • Replace #N/A with words a reviewer understands, using IFERROR round VLOOKUP and XLOOKUP's own if-not-found answer.
  • Match with INDEX and MATCH when the code sits to the right of the answer, the route that works in any Excel a colleague may have.
  • Split a file reference into office, section and serial number with LEFT, RIGHT and MID, and join names or codes with CONCAT, the ampersand and TEXTJOIN.
  • Keep a distinct list of districts with UNIQUE, every row for one office with FILTER and an ordered copy with SORT and SORTBY, all updating as the register changes.
  • Prepare lookup keys with TRIM, Find and Replace and Remove Duplicates, so every ID appears once and matches exactly.
  • Add district or scheme names to every row of a monthly return with a Power Query merge and a left outer join.

Projects

What you will build.

The course has 14 industry-standard projects. These three matter most here.

  • Project 06

    PeopleInsight HR workbook

    Employee data joined across sheets with one formula.

    Built as an HR analytics workbook, it is the course's nearest thing to a staff roster: department, partner and location details brought to every person by code, position codes split into their parts, and distinct lists, filtered views and sorted copies that keep themselves current as the source changes.

  • Project 12

    SalesFusion

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

    Built on sales files, it takes the lookup to the size of a whole return: a Power Query merge adds region and product names to every row by code with a left outer join, and the same mapping reaches each new file at a refresh.

Tap or pinch to zoom in, drag to move around. Click or scroll to zoom in, drag to move around.

  • Project 02

    Dunder Michael Paper Company employee database

    An employee list in the course, it shows the clean-up a lookup key needs first: stray spaces trimmed, spellings made consistent and repeated IDs found and removed, so every officer's or beneficiary's ID matches exactly once.

Lessons

The lessons that matter, in course order.

The Complete Excel Course with AI Integration has 186 lessons. This page picks out 14 of them, 1 h 13 min of video. Each lesson keeps its number in the course.

Where to start

Lesson 67 Lookup functions in Excel

Start at Lesson 67 if you already write SUM and IF: the lookups begin there on the PeopleInsight dataset. Unsure about locked references? Watch Lesson 10 first, since every lookup in the path depends on one, and take the clean-up lessons from Lesson 22 before your own register goes in. New to Excel? Begin at Lesson 1. Already fluent in VLOOKUP? Go straight to Lesson 69 for XLOOKUP and on to Lesson 75 for the spilled lists.

14 of 186 lessons · 1 h 13 min

03 Managing data in Excel: sort, filter and tables (Dunder Michael Paper employee database) 2 of 9 lessons · 19 min Clean keys before any lookup: TRIM, Paste Special values and Find and Replace take stray spaces and second spellings out of a column, and repeated IDs are highlighted, then removed, so each person appears once. The list is an employee database; a beneficiary register or a staff roster needs the same care.
  1. 22 Cleaning data in Excel TRIM, Paste Special values and Find and Replace 13 min
  2. 23 Remove duplicates in Excel Find and delete duplicate rows in an employee list 6 min
08 Advanced Excel functions: lookups, text and arrays 7 of 12 lessons · 31 min The lookups themselves, on the PeopleInsight HR workbook: why sheets are joined by a shared ID, VLOOKUP with an exact match and a locked table, XLOOKUP with its own not-found answer and a two-way lookup, IFERROR for lookup errors, INDEX and MATCH, names joined with CONCAT and TEXTJOIN, and codes split with LEFT, RIGHT and MID. A roster of officers is joined the same way.
  1. 67 Start here Lookup functions in Excel The PeopleInsight HR dataset and why lookups matter 2 min
  2. 68 VLOOKUP in Excel Find employee data across sheets with exact match 4 min
  3. 69 XLOOKUP in Excel Exact match, if not found and two-way lookup 6 min
  4. 70 IFERROR in Excel Handle lookup errors in VLOOKUP and XLOOKUP formulas 3 min
  5. 71 INDEX and MATCH in Excel A flexible alternative to VLOOKUP 6 min
  6. 72 CONCAT and TEXTJOIN in Excel Combine employee names and text with a delimiter 3 min
  7. 73 LEFT, RIGHT and MID in Excel Extract parts of a text code like DAL-SAL-0001 7 min
08 Advanced Excel functions: lookups, text and arrays 4 of 12 lessons · 18 min Lists that keep themselves current: UNIQUE for the distinct districts or statuses, FILTER for the rows meeting AND or OR conditions, SORT and SORTBY for ordered copies, then a challenge that fetches names and per-unit figures by XLOOKUP on a products and orders file. The spilled lists ask for a modern Excel.
  1. 75 UNIQUE function in Excel Extract a distinct list with dynamic arrays 6 min
  2. 76 FILTER function in Excel Dynamic array filtering with AND and OR criteria 5 min
  3. 77 SORT and SORTBY in Excel Sort data dynamically with formulas 4 min
  4. 78 Excel Ninja Challenge XLOOKUP, totals and text concatenation lookup challenge 3 min
15 SalesFusion: advanced data tools and a Power Query modelling system 1 of 21 lessons · 5 min The lookup done once for a whole table: a Power Query merge brings product and region names in beside their codes with a left outer join, the pattern for adding district or scheme names to every row of every return that arrives.
  1. 163 Merge queries in Power Query Look up product and region names with a left join 5 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.

From a roster's employee ID to a scheme's budget code, government files are joined by lookups: which course teaches an officer XLOOKUP and VLOOKUP?

The Complete Excel Course with AI Integration from Coding Liquids does, on PeopleInsight, an industry-standard HR workbook designed after talking with people from many different industries, where department and location details sit on sheets of their own and every employee row needs them. This page picks out the 14 lessons that make an officer fluent in joining lists, 1 hour 13 minutes of the course: clean keys first, then VLOOKUP, XLOOKUP, IFERROR, INDEX and MATCH, codes split and joined, the spilled lists that UNIQUE, FILTER and SORT produce, and a Power Query merge that maps a whole table at once. The joins you will make at work are the same joins under other names: a grade and duty station pulled from the staff roster into a training list, a scheme name beside each budget code, a beneficiary's details beside each payment.

Older shared workbooks in my department are full of VLOOKUP: is it still worth learning when XLOOKUP is better?

Yes, because those files will land on your desk, and The Complete Excel Course with AI Integration teaches the two side by side so you can keep the old and write the new. Lesson 68 builds VLOOKUP properly: the lookup value, a table range locked with F4, the column number and FALSE for an exact match, then shows its weak point by inserting a column into the lookup table and watching the results turn to zero. Lesson 69 then writes XLOOKUP, which points straight at the column it returns, so an inserted column leaves it unharmed, and searches left as easily as right. XLOOKUP needs a modern Excel, and a workbook that circulates to colleagues on older copies may have to stay with VLOOKUP or with INDEX and MATCH (Lesson 71), which work in any Excel. Knowing all three means no inherited file is a mystery.

Why can a VLOOKUP return the wrong person's record without showing any error?

Because its last argument was left out, and The Complete Excel Course with AI Integration closes that gap from the first VLOOKUP you write. Without FALSE, VLOOKUP looks for an approximate match, which on an unsorted list of IDs can quietly return a neighbouring row: no #N/A, just the wrong grade, posting or payment beside a name. Lesson 68 sets FALSE every time, so a missing ID shows as an error rather than a guess, and Lesson 69 writes XLOOKUP with an exact match. Two more quiet faults appear in those lessons: a table range left unlocked, which slides down as the formula fills and returns errors or zeros lower in the column, and a column inserted into the lookup table, which changes what VLOOKUP brings back. For a register that decides who is paid, each of those is worth catching before the list goes out.

A reviewer cannot read #N/A: what do the lessons do with an ID that is not on the list?

They swap it for words that say what went wrong, and The Complete Excel Course with AI Integration shows two ways to do that. On the PeopleInsight sheets, Lesson 70 breaks a department code on purpose so the lookup columns fill with errors, then gives each VLOOKUP an IFERROR wrapper that prints NOT MATCHED. XLOOKUP carries its own fallback text, used in Lesson 69, so a beneficiary missing from the approved list reads Not on register without any wrapper. For an officer the difference goes beyond tidiness: an approved list, a payroll extract or a roster rarely agrees with the register line for line, and a typo of one letter in a code is enough to lose a match. A plain message points the checker to the exact row; sort or filter on it and the discrepancies form a worklist to clear before any figure is signed off.

Our file references pack an office, a section and a serial number into one code: can formulas split them?

Yes, and then each part can be looked up or counted on its own. The Complete Excel Course with AI Integration splits exactly that kind of code in Lesson 73: a position code such as DAL-SAL-0001 gives its first three characters with LEFT, its last four with RIGHT and the three in the middle with MID, given a start position and a length. The lesson's code holds a location, a department or role group and an ID, the same shape as a reference that holds an office, a section and a serial number. Lesson 72 goes the other way, joining parts with CONCAT, the ampersand and TEXTJOIN, which puts first and last names together or rebuilds a reference in a standard form. Split the office out of every file reference and a lookup can bring in the office's full name and district beside it.

The code I match on sits to the right of the answer I need: is INDEX and MATCH still worth learning?

Yes: it reaches columns on either side of the code and runs in every Excel a partner office might use. The Complete Excel Course with AI Integration sets out VLOOKUP's limit in Lesson 71, where it reads left to right only, with the code in the table's first column, and then removes it: MATCH reports where a code sits in its column, 0 asking for an exact match, and INDEX hands back whatever stands at that position in the column you choose. Each function is tried alone first, then the pair runs on named tables with the @ sign taking the code from the current row. XLOOKUP (Lesson 69) folds the same job into one function on a modern Excel. Registers kept by other departments seldom put the ID first, and a file passed between offices may open in an older copy; INDEX and MATCH copes with both.

Can a lookup match on two things at once, such as an officer's ID and the financial period?

Yes, by more than one route, and The Complete Excel Course with AI Integration teaches the pieces. FILTER, in Lesson 76, returns every row that meets two conditions at once, written with an asterisk between them for AND, as the lesson does for active employees at one job level, or a plus sign for OR. Where the answer you need is a figure, SUMIFS from Lesson 37 returns it from a range matched on both conditions, an ID and a period for instance. Lesson 69 adds a two-way lookup, which finds the value where a row and a column meet, the shape of an allowance grid read by grade along one side and band down the other. Which route suits depends on what comes back: a list of rows, a single figure, or one value from a grid. FILTER needs a modern Excel.

I need grade, duty station and section from the master roster, not one column: must I write a lookup for each?

One formula per column, copied across rather than retyped, and The Complete Excel Course with AI Integration shows the detail that makes copying safe. In Lesson 69 the XLOOKUP for city is filled down, then copied across for state, region and work arrangement, with the return range moving one column each time. The lesson also catches the trap in that move: copied sideways, the lookup value shifted from the code column to its neighbour and had to be pointed back before the results were right. Lesson 68 does the same with VLOOKUP by changing the column number from 2 to 3 for the HR partner's name. Learn both and a training register, a posting list or a leave sheet gains every roster detail it needs in moments, each column traceable to the master list it came from.

Can I pull every case for one district into its own list without filtering by hand each time?

Yes: a FILTER formula keeps that list for you and updates it whenever the register changes. The Complete Excel Course with AI Integration builds it in Lesson 76, first for a single location code, then for one job level, then for two conditions with AND and for either of two locations with OR, each result spilling below its heading. Lesson 75 supplies the list of districts to choose from, since UNIQUE returns each value once and makes a ready source for a drop-down; Lesson 77 orders any result with SORT, or with SORTBY by a column you never show, such as the date received. The formulas need room to spill, so they sit beside the table rather than inside it, as Lesson 75 discovers when its first attempt errors. All three need a modern Excel, and none of them ever alters the register itself.

Why does a lookup fail on an ID that is plainly in the list?

Something invisible differs between the two lists, and The Complete Excel Course with AI Integration teaches you to find it. A stray space after a code, a second spelling of a district or a doubled character is enough, and Lesson 22 clears them with TRIM, Paste Special values and Find and Replace, with the column selected first so Replace All touches nothing else. An unlocked table range is the next suspect: Lesson 68 and Lesson 69 show the errors and zeros that appear lower down when it slides. In tables, Lesson 78 meets a subtler one: an @ in the reference takes only the current row's value, which breaks a lookup that needs the whole column, and removing it clears the error. And where an ID appears twice, a lookup simply returns the first, which is why Lesson 23 finds and removes repeated IDs before anything is matched.

Each month's regional returns need district names added from a code list: is there a faster way than filling a lookup down every file?

Yes: a Power Query merge performs the lookup once for the entire table, then again for every return at each refresh. The Complete Excel Course with AI Integration builds it in Lesson 163: a query of sales rows is merged with code tables for products and regions through a left outer join, keeping each row of the main table and placing the matching names alongside. Rows whose code finds no partner come back empty, which exposes a newly created district or a mistyped code immediately, and Lesson 168 makes a blank check the step before reporting. XLOOKUP stays the quicker choice on one sheet. Where district offices send the same layout month after month, the merge is built once, and the consolidated table arrives with names attached however many files come in.

VLOOKUP has always confused me: will the lessons make sense to someone who is not a spreadsheet person?

Yes: The Complete Excel Course with AI Integration explains what a lookup is for before you write one, then builds it one argument at a time. Lesson 67 opens the PeopleInsight workbook and shows the problem in plain terms: related details on separate sheets, joined today by copying and pasting, which is slow and invites mistakes. Lesson 68 then writes VLOOKUP piece by piece, what to look for, where to look, which column to bring back and FALSE for an exact match, and shows what goes wrong when the table range is not locked, so the error makes sense when it happens to you. The one skill to have beforehand is locking a reference with F4, taught in Lesson 10. Stuck on your own roster? The instructor support plan puts that question to the instructor, answered in writing, for two months from when you switch it on.

If Copilot writes the lookup between the staff roster and the training list, how do I know it matched the right people?

By checking it the way The Complete Excel Course with AI Integration teaches you to check any AI result, which takes moments once you know what to look for. The AI lessons have Copilot and ChatGPT write formula columns (Lesson 95) and Claude repair a broken one (Lesson 104), and each draft is read before it is kept. For a lookup that means three checks: look up two or three IDs by hand and compare, count the not-found messages and ask why each is missing, and confirm the table range is locked so rows near the bottom are as right as the first. Lesson 99 turns that into a habit with a short checklist: the right data selected, periods that line up, every source wired correctly, and an honest look at every figure. Knowing XLOOKUP yourself is what makes those checks quick.

Can lookups reconcile the payment list with the approved list in both directions?

Yes: one lookup each way shows the payments with no approval behind them and the approvals not yet paid. With the XLOOKUP of The Complete Excel Course with AI Integration, taught in Lesson 69, each payment row looks up its beneficiary ID in the approved list and returns a chosen message such as No approval where nothing matches; a second XLOOKUP on the approved list looks for each ID among the payments and marks Not yet paid. FILTER (Lesson 76) then gathers each set of exceptions into a list of its own. The lessons join employee, department and location tables; the method carries over unchanged. Before matching, clean both ID columns as Lesson 22 does and remove repeated IDs as Lesson 23 does, because a stray space produces a false exception and a repeated ID can hide a real one.

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.