Skip to content

Lookup Functionslesson 85 of 95

XLOOKUP

0daysLet's get rolling!

Loading the data...

0streak
0 XP today
All Lessons

XLOOKUP - Excel Practice Online

This short XLOOKUP exercise shows what the modern lookup adds, in five steps. A price list teaches the basic three-argument formula, then a product that is missing (Mango) shows how the fourth argument replaces #N/A with your own message.

The last steps do what VLOOKUP cannot: return a value to the left of the lookup column (a price of 80 belongs to Date), and match a number to the next smaller tier in a bonus table using match mode -1, so 7500 lands on the 5000 tier and returns 10.

What you'll practice in this XLOOKUP lesson

  1. XLOOKUP is the modern way to look up a value. Find the price of the product in D2 by looking it up in the product list A2:A5 and returning from the price column B2:B5. Put the answer in E2. - XLOOKUP searches the product column A2:A5 for the value in D2 (Cherry) and returns the matching price from B2:B5, which is 50.
  2. Your turn. Look up the price of the product in D2 using XLOOKUP, with the products in A2:A5 and the prices in B2:B5. Put the answer in E2. - The first argument is what to find (D2 = Banana), the second is where to look (A2:A5), and the third is what to return (B2:B5). Banana's price is 20.
  3. When the value is not found, XLOOKUP can show your own message with a 4th argument. The lookup value D2 is not in the list, so make E2 show the text "Not found" instead of an error. - The optional 4th argument is returned when there is no match. Because Mango is not in A2:A5, XLOOKUP returns the text "Not found" instead of the old #N/A error.
  4. Unlike VLOOKUP, XLOOKUP can return a value to the left of the lookup column. The price to find is in D2. Return the product name from A2:A5 by searching the prices in B2:B5. Put the answer in E2. - Here the lookup array is the price column B2:B5 and the return array is the product column A2:A5 - to its left. A price of 80 belongs to Date. VLOOKUP could not do this.
  5. XLOOKUP can also do range (approximate) matching. The 5th argument -1 means "exact match, or the next smaller value", and the 4th argument can be left empty. Find the bonus tier for the sales figure in D2 using the tier table in A2:B5. Put the answer in E2. - 7500 is not an exact tier, so match mode -1 drops to the next smaller tier (5000) and returns its bonus, 10. The empty 4th argument (the two commas) skips the "if not found" text.

XLOOKUP practice - FAQ

How do I practice XLOOKUP in Excel?

Open this LogicExcel exercise and work through 5 interactive steps. You type the real formula into a live spreadsheet grid and get instant feedback on whether it is correct, plus an explanation. You need no Excel install.

Is the XLOOKUP exercise free?

Your first two lessons are free with a free account. After that the pass opens all 95 lessons, the Academy and the accounting course. Lessons you finish stay open.

What will I learn in this XLOOKUP lesson?

This lesson covers XLOOKUP as part of the Lookup Functions track. You practice the syntax step by step until it becomes muscle memory you can use at work.

What does the fourth argument of XLOOKUP do?

It is the value returned when nothing matches. In this lesson Mango is not in the product list, so a fourth argument of "Not found" replaces the #N/A error with that text.