The Complete Excel Course with AI Integration

XLOOKUP and VLOOKUP for teachers

A teacher's pupil details live in one list and are needed in many others: the trip sheet, the seating plan, the mark book, the parents' evening rota. The Complete Excel Course with AI Integration ends the retyping with lookups learnt on PeopleInsight, an industry-standard HR workbook. This path runs from a clean class list kept as a table, through VLOOKUP, XLOOKUP and INDEX with MATCH, to messages for missing pupils and a Ninja Challenge.

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:

  • Fill a trip list, seating plan or mark book from one master class list with XLOOKUP, keyed on the pupil number so a correction made once reaches every sheet.
  • Read and repair the VLOOKUP formulas in inherited department files: exact match with FALSE, the table range locked, and a column number that no longer points where it did.
  • Show Not on roll, or any words you choose, for a pupil missing from a list, with XLOOKUP's if-not-found answer or IFERROR round either lookup.
  • Look up to the left when the pupil number sits to the right of the names, using INDEX with MATCH or XLOOKUP.
  • Pull the mark where a pupil's row meets an assessment's column with a two-way lookup.
  • Clean the keys before matching, with TRIM for stray spaces and a duplicate check that leaves one row per pupil number.
  • Bring a quiz export or last term's marks into this term's sheet by pupil number, with the change set beside each pupil.

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 analytics workbook with staff details spread over several sheets, it is the drill ground for every lookup a teacher needs: names fetched by VLOOKUP, location columns by XLOOKUP with its own not-found text, partner names again through INDEX and MATCH, all keyed by an ID the way a class list is keyed by pupil number.

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 a paper company's staff list, it is where a list becomes an Excel Table, loses its stray spaces and misspellings and is cleared of repeated IDs: the preparation that lets a pupil number match first time, every time.

Lessons

The lessons that matter, in course order.

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

Where to start

Lesson 19 Excel tables

Start at Lesson 19 if your class list is still a plain range: a table and a quick clean-up make every lookup after them more reliable. Already keep a tidy table with one row per pupil number? Skip ahead to Lesson 67, which opens the lookup lessons with the reason a shared ID matters. Still unsure of SUM and of locking a cell with F4? Take Lesson 8 to Lesson 12 first, because every lookup leans on references that stay put.

10 of 186 lessons · 54 min

03 Managing data in Excel: sort, filter and tables (Dunder Michael Paper employee database) 1 of 9 lessons · 8 min An Excel Table, its structured references and a total row: keep the class list as a table and a lookup that reads it by column takes in a pupil who joins later, where a fixed range would stop short. The lesson's table is a staff list.
  1. 19 Start here Excel tables Create and format a table, structured references and total row 8 min
03 Managing data in Excel: sort, filter and tables (Dunder Michael Paper employee database) 2 of 9 lessons · 19 min Clean keys before matching: TRIM strips the stray spaces an export leaves behind, Paste Special values keeps the clean text, Find and Replace mends a misspelling everywhere at once, and Remove Duplicates, after a highlight for repeated values, leaves one row per ID, the rule a pupil number must obey before anything looks it up.
  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 6 of 12 lessons · 24 min The lookups themselves, on an HR workbook: why a shared ID ties sheets together, VLOOKUP with an exact match and its table range locked, XLOOKUP with an if-not-found answer and a two-way lookup, IFERROR for lookup errors in both, INDEX with MATCH where the key sits to the right, and CONCAT, the ampersand and TEXTJOIN to set a full name beside whatever was fetched.
  1. 67 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
08 Advanced Excel functions: lookups, text and arrays 1 of 12 lessons · 3 min The Ninja Challenge: names fetched from a second sheet by XLOOKUP, another XLOOKUP for the per-unit figure, a line total worked out from the two and an order ID given a text prefix, tried first and then checked against a solution file.
  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.

Every trip list, seating plan and mark book I make needs details from the master class list: can XLOOKUP and VLOOKUP fill them in for me?

Yes, by pupil number: The Complete Excel Course with AI Integration from Coding Liquids puts both lookups to work on PeopleInsight, an industry-standard HR workbook whose details are spread over several sheets much as a school's are, designed like every project in the course after conversations with people across many industries. Type a pupil number on any sheet and XLOOKUP (Lesson 69) returns their form group, parent contact or exam arrangement from the master list; VLOOKUP (Lesson 68) does the same in the files colleagues already use. Keep one master list, let every other sheet fetch from it, and a correction made once reaches the trip list, the seating plan and the mark book together. The path is 10 lessons, 54 minutes in all, from a clean class list to lookups that say plainly when a pupil cannot be found.

Our department's old mark books are full of VLOOKUP: should I learn it, or go straight to XLOOKUP?

Learn both, in the order The Complete Excel Course with AI Integration teaches them, because each has its job in a school. VLOOKUP comes first (Lesson 68): an exact match with FALSE, the table range locked so the formula survives being filled down, and the reason it breaks, since it counts columns by number and an inserted column throws the count. That is what keeps inherited mark books working. XLOOKUP follows (Lesson 69): it points straight at the column it returns, searches left as well as right and carries its own message for a pupil who is not there, so new sheets are better built with it. XLOOKUP needs a modern Excel, and a colleague on an older one sees errors where your results should be, so VLOOKUP stays the safer choice for a file passed round. Lesson 71 adds INDEX with MATCH, which works in either.

What will XLOOKUP show for a pupil who is not on the list, and can VLOOKUP say something kinder than #N/A?

A message you choose, and The Complete Excel Course with AI Integration teaches it for both functions. In Lesson 69 XLOOKUP's own if-not-found argument returns n/a in the lesson, and could return Not on roll or Joined this week in your mark book, so a missing pupil reads as a fact rather than a fault. Lesson 70 breaks a lookup on purpose by changing one code, watches errors appear in both lookup columns, then wraps the formulas in IFERROR so they read NOT MATCHED instead; the lesson's title covers lookup errors in VLOOKUP and XLOOKUP formulas alike. Its point holds in any school list: a single wrong character in a pupil number is enough to break a match. A worded message also tells a colleague reading your sheet what happened, where a raw error code tells most people nothing at all.

A colleague added a column to the class list and my VLOOKUPs now show the wrong details: why, and would XLOOKUP have survived?

VLOOKUP counts columns by number, so an inserted column shifts what it returns, and The Complete Excel Course with AI Integration makes that happen on purpose in Lesson 68: a column added to the lookup table turns the results to zeros until the change is undone. The column number you typed for form group now points at whatever moved into that place. XLOOKUP would have survived: Lesson 69 shows it pointing straight at the return column itself, so a new column beside it changes nothing. For a shared class list that several colleagues edit, that alone is a reason to build new lookups with XLOOKUP. Lesson 71 gives INDEX with MATCH the same resilience in any Excel, since the column it returns from is a range of its own rather than a number someone typed.

Our pupil numbers sit to the right of the names: can a lookup still find a pupil's form group?

Yes, with either of two lookups The Complete Excel Course with AI Integration teaches, though VLOOKUP is not one of them. VLOOKUP searches only the first column of its table and returns values to its right, which Lesson 71 sets out as the limit INDEX and MATCH remove: MATCH finds the row where the pupil number sits, and INDEX returns the form group from any column you name, left of the key or right of it. XLOOKUP (Lesson 69) does the same in one function, because it takes the column to search and the column to return as two separate ranges. So a school system's export with names first and pupil numbers last needs no rearranging before you look anything up. The lessons fetch partner names and locations from HR sheets; your columns are form, set and tutor.

Can a lookup find the mark where a pupil's row meets an assessment's column in my grid?

Yes: that is a two-way lookup, which The Complete Excel Course with AI Integration names in the title of Lesson 69, the XLOOKUP lesson. A mark book is a grid, pupils down the side and assessments across the top, and a two-way lookup reads it from both edges at once: give it a pupil and an assessment and it returns the mark at the crossing, so a summary sheet can show any pupil's result on any test without a formula in every cell. Lesson 71 then shows INDEX returning the value at a given row and column of a table, and MATCH finding where a value sits, the parts such a lookup is made of. With the pupil and the assessment chosen in two cells at the top, one formula answers a parent's question at a parents' evening in seconds.

Can a lookup turn a percentage into a grade from my boundaries table?

Grades from boundaries are written with IFS in The Complete Excel Course with AI Integration, and the lookups on this page do the matching they are best at. Lesson 32 tests the boundaries in order from the top grade down and finishes with TRUE as a catch-all, so every percentage lands in a band, with the boundaries in plain view inside the formula for anyone checking it. The lookup lessons use exact matches throughout, FALSE in VLOOKUP and an exact match in XLOOKUP, because a pupil number either matches or it does not; the approximate-match setting that reads a boundaries table is not among them. Used together, the two cover a mark book's whole job: XLOOKUP brings a pupil's marks in by number, IFS grades them, and Lesson 37 counts each grade in each class with COUNTIFS.

Two pupils in the same year share a name: will a lookup mix them up?

A lookup keyed on the pupil number keeps them apart, and The Complete Excel Course with AI Integration builds every lookup on an ID for exactly this reason. Lesson 67 sets out the principle: sheets connect through a shared value such as an employee ID, and for you that value is the pupil number, unique to one child. A lookup by name returns the first match it meets, so the second pupil quietly inherits the first one's details. Before relying on a key, prove it is unique: Lesson 23 highlights repeated values with conditional formatting and then removes duplicate rows, on the rule that an ID is like a passport number, one person and one number. After that, XLOOKUP or VLOOKUP by pupil number fetches the right record every time, whatever the names.

My quiz scores come out of an online platform as a separate file: can a lookup bring them into my mark book?

Yes, and the method The Complete Excel Course with AI Integration teaches makes it a few minutes' work each time. The lessons look up across sheets of one workbook, so bring the export in as a sheet of its own, then let XLOOKUP (Lesson 69) fetch each pupil's score by the key both files share, a pupil number or a school email address. A pupil who missed the quiz gets your not-found text instead of an error, and a misspelt email shows up the same way, because one wrong character is enough to break a match (Lesson 70). Tidy the key first: Lesson 22 trims the stray spaces exports carry. When the same export lands every week, the Power Query merge of Lesson 163 does that matching as a saved step that reads the file itself, a stage further on in the course.

Can one lookup fill a pupil's form group, contact email and support notes, or do I need one for each column?

One formula per column, written once and copied across, and The Complete Excel Course with AI Integration shows the quick way to do it. In Lesson 69 XLOOKUP fills four columns of location details: the first formula locks the searched range with F4, then it is copied across, the return range moved one column each time and the lookup value set back to the key when copying shifts it. In Lesson 68 VLOOKUP fetches a second detail simply by changing its column number. For a teacher that means a trip sheet with form group, emergency contact and medical note filled from the master list in minutes, every cell traceable to one source. Lock the ranges before filling down, or the rows below drift, the slip both lessons show and then correct.

Why do my lookups work for the first few pupils and then return errors further down?

An unlocked table range is the usual cause, and The Complete Excel Course with AI Integration shows the slip happening before it fixes it. In Lesson 68 a VLOOKUP filled down the column returns errors in the rows below, because the table range slid down with each copy; F4 locks it and the errors clear. Lesson 69 gives the same warning for XLOOKUP: errors or zeros lower down usually mean a range left free. The second cause is the key itself: a pupil number with a stray space from an export, or a code with one wrong character (Lesson 70), never matches. TRIM in Lesson 22 removes leading, trailing and doubled spaces, and Paste Special values keeps the clean result. Check those two things and nearly every broken lookup in a mark book mends itself.

Can a lookup check that every pupil in my class appears on the exam entry list?

Yes: look each pupil up in the entry list and let the not-found answer do the checking, a method The Complete Excel Course with AI Integration gives you in Lesson 69. An XLOOKUP of every pupil number against the entries returns their entry details where a match exists and your own words, Not entered for instance, where none does; Lesson 70 gives VLOOKUP the same kind of message through IFERROR. A COUNTIF of Not entered (Lesson 36) tells you at once how many are missing, and a filter on that column (Lesson 21) lists them by name. Run the same lookup the other way, from the entry list to your class list, and a candidate entered by mistake shows up too. Because the match is by number, a misspelt name on either list makes no difference to the result.

Can a lookup put last term's marks beside this term's so I can see who has moved up or down?

Yes: fetch last term's mark by pupil number and subtract, and The Complete Excel Course with AI Integration covers each half. Keep each term on its own sheet; on this term's sheet an XLOOKUP (Lesson 69) brings each pupil's earlier mark across by number, so the order of the two lists does not matter, and a pupil who has arrived since gets your not-found text instead of someone else's mark. A plain subtraction beside it, the cell arithmetic of Lesson 8, shows the change, and a highlight rule from Lesson 15 can colour every fall. Because the match is by number, the comparison stays right after either list is re-sorted by surname or by result, something copy and paste can never promise. The lessons match staff records; a term's marks follow the same logic.

Can a lookup bring each pupil's target into my mark book from the data manager's sheet?

Yes: XLOOKUP by pupil number carries every target across, and The Complete Excel Course with AI Integration teaches each step from Lesson 69. Copy the data manager's sheet into your workbook, lock its ranges with F4, and each row of the mark book fetches its own pupil's target whatever order the two lists are in; a pupil who joined after targets were set gets your not-found text, No target yet perhaps, instead of an error. Beside it, an IF compares the current result with the target, the pattern Lesson 30 uses to label each sale Achieved or Missed against its quota, and a highlight rule from Lesson 15 can pick out every pupil below. When targets are revised, paste the new sheet over the old one and every pupil's target in the mark book changes with it, with no row retyped.

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.