The Complete Excel Course with AI Integration

XLOOKUP and VLOOKUP for team leaders

A team leader's sheets keep asking the same questions: whose ID is this, which shift, what target, who in HR looks after them. The Complete Excel Course with AI Integration answers them with lookups on PeopleInsight, an industry-standard HR workbook, and this path takes XLOOKUP, VLOOKUP and INDEX with MATCH from a first exact match to a two-way target grid, with the clean keys and plain error messages that keep a shared tracker honest.

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:

  • Bring each person's role, department, site and HR contact onto the team scorecard from the roster with XLOOKUP and VLOOKUP, matched exactly on their ID.
  • Read each person's target from a grid of names and months with a two-way XLOOKUP, so every result is held against the right figure.
  • Set last week's figure beside this week's for every person with a lookup across sheets, ready for a week-on-week comparison.
  • Turn rota and shift codes into names and hours from one small code table that is edited in a single place.
  • Show a plain message such as Not on roster in place of #N/A, with XLOOKUP's own if-not-found answer or IFERROR round a VLOOKUP.
  • Keep lookups working when a colleague inserts a column, and keep files for older Excel working with INDEX and MATCH.
  • Clean names and build full-name keys with TRIM, Find and Replace and CONCAT, so a lookup finds everyone who is on the list.

Projects

What you will build.

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

  • Project 06

    PeopleInsight HR workbook

    Employee data joined across sheets with one formula.

    Built as an HR analyst's workbook, with employees, departments and locations kept on separate sheets, it holds the joins a team leader's own files need: a department code turned into its name and HR contact, a location code into site, region and work pattern, errors replaced by plain messages and one lookup written three ways, so any tracker you inherit can be read.

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

    Built as an employee list to keep in order, it is where stray spaces are trimmed and second spellings fixed with Find and Replace, so the names and IDs a lookup depends on match before the first XLOOKUP is written.

Lessons

The lessons that matter, in course order.

The Complete Excel Course with AI Integration has 186 lessons. This page picks out 8 of them, 40 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 PeopleInsight lookups begin there, each one a join a team leader makes at work. Names typed by several people? Take Lesson 22 first, so they match before you look them up. Never written a formula at all? Lesson 8 is the better first step, with the lookups waiting after the essentials. At home with VLOOKUP already? Go straight to Lesson 69 for XLOOKUP and its two-way lookup.

8 of 186 lessons · 40 min

03 Managing data in Excel: sort, filter and tables (Dunder Michael Paper employee database) 1 of 9 lessons · 13 min Clean keys before any lookup, on an employee database: TRIM for stray spaces, Paste Special values to keep the cleaned text and Find and Replace for a second spelling. A name with a trailing space looks identical on screen and still fails to match, which is why this lesson comes before the lookups.
  1. 22 Cleaning data in Excel TRIM, Paste Special values and Find and Replace 13 min
08 Advanced Excel functions: lookups, text and arrays 5 of 12 lessons · 21 min The lookups themselves on the PeopleInsight HR dataset: why a lookup beats copying between tabs, VLOOKUP with an exact match and a locked table, XLOOKUP with its own if-not-found answer and a two-way lookup, IFERROR round lookups that miss, and INDEX with MATCH for older files and for looking left. Every join between a roster, a target list and a scorecard is one of these.
  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
08 Advanced Excel functions: lookups, text and arrays 1 of 12 lessons · 3 min CONCAT, the ampersand and TEXTJOIN joining first and last names into one full name: the key to build when a scorecard knows people by name and the roster splits the name in two.
  1. 72 CONCAT and TEXTJOIN in Excel Combine employee names and text with a delimiter 3 min
08 Advanced Excel functions: lookups, text and arrays 1 of 12 lessons · 3 min A lookup challenge on a sheet of products and a sheet of orders: XLOOKUP for each name and per-unit figure, a total calculated from the looked-up value and an ID rebuilt from text, tried first and then checked against the solution.
  1. 78 Excel Ninja Challenge XLOOKUP, totals and text concatenation lookup challenge 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.

How do XLOOKUP and VLOOKUP hold up for a team leader whose trackers the whole team edits?

XLOOKUP holds up better and is the one to learn first, though both earn their place, and The Complete Excel Course with AI Integration from Coding Liquids sets them side by side on PeopleInsight, an industry-standard HR workbook designed after talking with people from many different industries. XLOOKUP looks left or right and points straight at the column it returns, so a colleague's edit elsewhere in the table leaves it alone, and it carries its own answer for an ID it cannot find (Lesson 69). VLOOKUP counts its columns by number and has to be told FALSE for an exact match (Lesson 68); many trackers still run on it, so reading it matters. INDEX with MATCH, the third way, follows in Lesson 71. The path here, 8 lessons and 40 minutes, adds the clean keys and plain error messages a shared tracker needs, all practised on starter and finished files.

HR added a column to the roster and my VLOOKUPs now bring back the wrong field: does XLOOKUP stop that?

Yes, and The Complete Excel Course with AI Integration lets you watch the fault happen before it fixes it. In Lesson 68 a column is inserted into the lookup table and the VLOOKUP results turn to zeros, because VLOOKUP asks for the third or fourth column by number and the numbers no longer point where they did. XLOOKUP is given the return column itself, so an insert moves the reference along with the column and the answers stay right (Lesson 69); INDEX with MATCH does the same in any version of Excel (Lesson 71). For a team leader whose roster belongs to someone else, that is the difference between a scorecard that survives HR's next change and one that quietly reports the wrong role or site for everyone. Rebuilding an old VLOOKUP as XLOOKUP is a short job once both are familiar.

My manager sends targets as a grid, people down the side and months across: can a lookup read the right cell?

Yes: that is a two-way lookup, which The Complete Excel Course with AI Integration builds with XLOOKUP in Lesson 69, a lesson whose title names it. A two-way lookup returns the value where a row and a column meet, so it gives the one target for this person in this month, never a neighbour's figure or last month's. When a new grid arrives laid out the same way, paste it over the old one and every target on the scorecard follows. INDEX with MATCH, taught next (Lesson 71), gives the same row-and-column logic in any Excel: MATCH returns a position, not a value, which is exactly what INDEX needs to find a cell. Set the looked-up target beside each result, and the achieved-or-missed label of the Sales Goal Tracker (Lesson 30) reads it like any other number.

Can a lookup set each person's figure from last week beside this week's?

Yes, with the lookups across sheets that The Complete Excel Course with AI Integration teaches in Lesson 68 and Lesson 69. Keep each week's results on a sheet of their own, and on this week's scorecard an XLOOKUP finds each person's ID on last week's sheet and brings their figure across, so the two weeks sit side by side and a simple subtraction shows who moved up and who slipped. The same formula serves last month or the matching week of last quarter: point it at a different sheet. A person who joined this week has no figure to fetch, and XLOOKUP's if-not-found answer says so in words instead of showing #N/A (Lesson 69), or IFERROR does the same round a VLOOKUP (Lesson 70). Lock the lookup range before filling down, as Lesson 68 shows, or the rows further down lose their match.

Our rota uses short codes for each shift: can a lookup turn them into shift names and hours?

Yes: a table of codes and descriptions is exactly what the PeopleInsight lookups are built on, and The Complete Excel Course with AI Integration teaches it twice. In Lesson 68 each employee's department code, such as SAL or ENG, becomes the department's full name through VLOOKUP with an exact match; in Lesson 69 a location code becomes a city, a state, a region and a work arrangement through XLOOKUP. Put your shift codes in a small table with each shift's name, start and finish, and the rota can show any of them beside every code. The real gain is upkeep: when a shift's hours change, you edit one row of the code table and every rota that looks it up changes with it. Exact match matters here, because an approximate one could hand an early shift the hours of a late one.

Can a lookup show which of my people work onsite and which hybrid, and where each one is based?

Yes, and The Complete Excel Course with AI Integration builds exactly that lookup in Lesson 69. Each employee's location code is looked up in a location table with XLOOKUP, and the formula, written once and copied across, fills in the city, the state, the region and the work arrangement, hybrid or onsite, its return range moved one column each time. For a team leader that turns a bare list of names into a planning sheet: who is in on office days, who is based at which site, which region a cover request should come from. With the work arrangement beside each name, COUNTIF from the formulas lessons (Lesson 36) counts how many of the team are onsite. The lesson also shows the slip to avoid when copying across, the lookup value shifting to the next column, and how to set it back.

Each department has its own HR contact: can my team sheet show whom to call about each person?

Yes, it is one of the first lookups The Complete Excel Course with AI Integration builds. In Lesson 68 VLOOKUP takes each employee's department ID to the department table and returns the department's name from its second column, then the HR business partner's name from its third, so every row shows who in HR looks after that person. Lesson 71 builds the same HR column again with INDEX and MATCH on named tables, which teaches you to read whichever version a colleague's file uses. On your own team sheet the department table becomes whatever list your organisation keeps, contacts, cost centres or managers, and one lookup per column carries it onto every row. When a contact changes, one cell in the table changes and the team sheet follows.

A new starter is not on the roster yet: will my scorecard show #N/A, or a message I choose?

A message you choose, and The Complete Excel Course with AI Integration teaches it for both lookups. XLOOKUP has an if-not-found answer of its own, which Lesson 69 fills with a short text, so a missing ID shows words instead of an error. For VLOOKUP, Lesson 70 changes one department code on purpose, watches the errors appear, then wraps each formula in IFERROR with NOT MATCHED as the message. The lesson's warning fits a team sheet well: a single extra letter in a code is enough to break a lookup, so a mistyped ID and a new starter show the same message, and both deserve a look. Stray spaces cause the same miss on names, which is why Lesson 22 trims them first. A raw #N/A tells most readers nothing; a clear label tells them what to fix.

Should my sheets look people up by name or by employee ID?

By ID wherever one exists, and The Complete Excel Course with AI Integration explains why from its first lookup lesson. Lesson 67 shows lookups joining sheets through a shared value such as an employee ID: an ID belongs to one person only, while names repeat, change and pick up stray spaces. Where a file knows people only by name, Lesson 72 joins first and last names into one full name with CONCAT, the ampersand or TEXTJOIN, so a roster that splits the two can still be matched against a scorecard that does not, and Lesson 22 trims the spaces that would stop a match. Capitals are no problem, since a lookup treats SMITH and Smith alike. For a team leader the ID habit pays twice: two people with one name stay apart, and a surname change never breaks a row.

If XLOOKUP is the better lookup, why does the course still teach a team leader VLOOKUP and INDEX with MATCH?

Because the trackers you inherit and the people you share them with decide which lookup a file can use, and The Complete Excel Course with AI Integration prepares you for every case. Plenty of workbooks handed from one team leader to the next run on VLOOKUP, so Lesson 68 teaches you to read and repair it: the exact-match FALSE, the column number and the locked table. XLOOKUP needs a modern Excel, so a file opened by colleagues on older versions is safer with VLOOKUP or with INDEX and MATCH, which Lesson 71 presents as the flexible alternative: MATCH finds the row, INDEX returns the value, and it can look to the left of the key, which VLOOKUP never can. Knowing all three means no tracker on a shared drive stays a mystery to you.

My lookup is right on the first row and wrong further down: is that taught?

Yes, it is one of the faults The Complete Excel Course with AI Integration shows on purpose. When a VLOOKUP is filled down without its table locked, the table range slides down with every row, so the rows near the bottom search a shrinking table and return errors; Lesson 68 locks the range with F4 before filling, and Lesson 69 notes that errors or zeros lower down usually mean the same unlocked range. The lookup challenge adds a second trap (Lesson 78): in a table, an @ before a reference takes only the current row, so a lookup that needs the whole column fails until the @ is removed. Both faults leave the first rows looking right, which is why they slip into team files unnoticed; once you have seen them happen, they take seconds to spot.

My team is small: is a lookup worth setting up, or is copying across quicker?

Worth it from the second week, and The Complete Excel Course with AI Integration makes the case in Lesson 67: copying between tabs is slow, messy and invites mistakes, while a lookup joins two sheets through a shared ID and applies the same logic to every row. A small team still means the same copying every week, and each copy is a chance to paste one person's figure into another's row. Written once, an XLOOKUP column fills itself for everyone, follows the roster when someone joins or leaves, and shows a plain message when a name is missing instead of carrying a wrong one forward. The lessons are short, the whole lookup path is 40 minutes, and the same formula serves a team of five as well as a team of fifty.

A part-timer's target should be pro rata: can a looked-up daily target be multiplied by the days they work?

Yes: fetch, then calculate, which is the pattern The Complete Excel Course with AI Integration drills in its lookup challenge (Lesson 78). There, XLOOKUP fetches each order's per-unit figure from a products sheet, and the order's total is that looked-up value times the quantity ordered. On a team sheet the products sheet becomes a table of daily targets by role, the quantity becomes the days each person works, and the result is a target that is fair to a part-timer and a full-timer alike. You try the challenge before opening the solution file, and the same lesson clears an error caused by an @ in a table reference, the kind that turns up the first time you build this on your own file. Look up each person's working days from the roster as well (Lesson 69), and the target updates by itself when anyone's hours change.

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.