ExcelyourTraining

Home › Blog

The VLOOKUP question in your Excel test, and how to check a lookup an AI assistant wrote

If you're applying for an admin, finance, data-capturing or sales support job, there's a good chance you'll be asked to do an Excel test. Lookups are one of the topics that come up most often in Excel interview questions, and VLOOKUP is usually the one named.

This post covers the kind of VLOOKUP task you might get, short answers to the follow-up questions, and a habit that matters more every year: checking a lookup formula that an AI assistant wrote for you. By the end you'll have a checklist you can use in a test and at your desk.

What the test task usually looks like

Excel assessments differ between employers, so there's no single official format. Still, the lookup task tends to follow a familiar shape. You get two tables and have to bring them together.

For example, a sheet of orders from a Johannesburg branch:

A B C
1 Order Code Qty
2 1041 M220 3
3 1042 K110 1
4 1043 S330 5

And a price list on another sheet called Prices:

A B C
1 Code Product Price
2 S330 USB cable R79
3 K110 Keyboard R349
4 M220 Wireless mouse R229

The instruction: "Add the unit price in column D and the line total in column E."

A strong answer in D2 is:

=VLOOKUP(B2,Prices!$A$2:$C$4,3,FALSE)

And in E2, =C2*D2. Fill both down with Ctrl+D (Windows) or Cmd+D (Mac).

Notice that the price list isn't sorted. That's often deliberate. An assessor can see at a glance whether you know to use FALSE.

The follow-up questions, with short answers

Interviewers often ask you to explain what you did. These come up a lot.

What does FALSE do at the end? It forces an exact match. Without it, VLOOKUP uses approximate match, which is the default, and can return a wrong value from an unsorted list.

Why are there dollar signs in the range? They lock the table so it doesn't move when the formula is filled down. You add them with F4 (Windows) or Cmd+T (Mac).

Why might you get #N/A? The code isn't in the list, or it's stored differently: a number stored as text, or an extra space.

What's the difference between XLOOKUP and VLOOKUP? XLOOKUP is exact by default, can look left, doesn't need a column number, and has a built-in "not found" option. It's available in Microsoft 365, Excel 2021 and later, and Excel for the web, but not in Excel 2016 or 2019.

How would you look up a value to the left? With INDEX and MATCH, or with XLOOKUP if the version allows it.

You don't need long answers. Short and accurate shows you understand what the formula is doing, not just that you memorised it.

Where AI assistants come in

Many people now ask an AI assistant in Excel, or a chatbot, to write formulas for them. That's a sensible use of the tool. It's quick, and it often gets the formula right.

The risk is in the times it doesn't. A broken formula that shows an error is easy to catch. A formula that returns believable numbers is not.

Here's the scenario from our AI lesson. You ask the AI assistant to fill a price column from a small product table: a kettle at R320, a toaster at R210, a blender at R450 and a mixer at R650. It writes an XLOOKUP, along these lines:

=XLOOKUP(A2,$E$2:$E$6,$F$2:$F$6)

Every price comes back right. XLOOKUP matches exactly by default, so there's nothing to forget.

Then you ask for the same thing with VLOOKUP, because colleagues on older versions of Excel need to open the file. The assistant replies with something like:

=VLOOKUP(A2,$E$2:$F$6,2)

It looks reasonable. It produces prices, not errors. But the fourth argument is missing, so VLOOKUP falls back to approximate match. The product table isn't sorted, and approximate match needs it to be. In the lesson's preview, the toaster comes back at R650, the mixer's price, while the table clearly says R210. Nothing on the sheet flags it.

If that sheet feeds an invoice or a stock order, the mistake costs real money. And because there's no error, the person most likely to catch it is whoever checks the formula.

How to check an AI Excel formula: a checklist

Use these checks on any lookup formula, whether an AI assistant wrote it, a colleague sent it, or you inherited it in an old workbook.

  1. Read the last argument. For VLOOKUP, is there a FALSE or 0 at the end? For MATCH, is the third argument 0? If not, ask why.
  2. Check the ranges are locked. Look for dollar signs on the table. Then click a formula near the bottom of the column and confirm the range hasn't drifted.
  3. Count the column number. Does 3 really point at the price column, counting from the left edge of the table?
  4. Spot-check by hand. Pick two or three rows, find the code in the price list yourself and compare. Choose rows from the top, middle and bottom.
  5. Test a code that doesn't exist. Type a made-up code. A safe exact-match formula returns #N/A or your "not found" message. If it returns a price, the formula is using approximate match.
  6. Sort the price list a different way. On a copy of the sheet, sort the lookup table by product name. Correct exact-match results won't change. If prices shift, the formula depends on the order of the list.
  7. Check the version. If the workbook will be opened in Excel 2016 or 2019, XLOOKUP will show #NAME? there. Plan for a VLOOKUP or INDEX and MATCH version, and check that version just as carefully.

Steps 4 and 5 take less than a minute and catch most problems. They're also a good thing to mention in an interview. Saying "I'd spot-check a few rows and test a missing code" tells an employer you don't just trust the output.

Practise before the test

Knowing the theory helps, but in a timed test you want your fingers to know the formula.

Start with lesson 22, VLOOKUP (exact match), then lesson 24, XLOOKUP and lesson 25, INDEX and MATCH. When you're comfortable, try lesson 26, Lookups with AI, where you check the AI assistant's work yourself and catch the missing FALSE. Every lesson runs in your browser and grades your answer when you press Enter. Free, no sign-up, nothing to install.

ExcelyourTraining is not affiliated with Microsoft. Excel is a trademark of Microsoft Corporation.