Tabellab

Case 1: Lookup Test with XLOOKUP, INDEX/MATCH and Tiers

Lesson 1 of 20Lab

All lessons

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 20 is free. Unlock all 20 hands-on labs, the final exam and your certificate.

Buy course — €9.90
Loading the spreadsheet…

Why lookup questions are the heart of an Excel test

You have applied for an analyst, finance, operations or sales support role, and the invitation says there will be a short Excel assessment. You probably will not know the exact questions in advance, and every company designs its own test. But practice tests of this kind keep returning to the same handful of skills, and lookups are usually the first one: can you take a code in one table and pull the matching price, region or rate from another table, without typing anything by hand and without breaking when you copy the formula down?

This free lesson is Case 1 of an eight-case practice course. It is written for job seekers who use Excel regularly but feel unsure under time pressure, for career changers who learned VLOOKUP years ago and have not met XLOOKUP yet, and for anyone who wants a calm, structured way to rehearse. You will work with the fictional wholesaler Northbeam Supply: 16 orders, a product price list, a customer table and a discount tier table. All names and numbers are invented for practice, and nothing here describes how any particular employer tests candidates. What it gives you is a reliable method that works whatever the test looks like.

The core concept: three kinds of lookup

Almost every lookup question in a test falls into one of three patterns, and the fastest candidates recognise the pattern before they type anything.

1. Exact match. The key must exist. Order SO-5106 is for product PW-12; the product table lists PW-12 at 24.50; so the unit price is 24.50 and the order value is 85 × 24.50 = 2,082.50. If the code is missing you want an error, not a guess. In Excel: =XLOOKUP(C4,$A$22:$A$27,$C$22:$C$27) or the classic =VLOOKUP(C4,$A$22:$C$27,3,FALSE). The FALSE at the end is what makes VLOOKUP exact.

2. Approximate (tier) match. The value does not appear in the table at all. Northbeam gives 0 % below 1,000, 2 % from 1,000, 5 % from 2,500 and 8 % from 5,000. The value 2,082.50 is none of those numbers. What you want is the largest threshold that is not above the value: 1,000 ≤ 2,082.50 < 2,500, so the discount is 2 %. In Excel: =XLOOKUP(F4,$A$32:$A$35,$B$32:$B$35,,-1), where the -1 in the fifth argument means "exact match or next smaller item". =VLOOKUP(F4,$A$32:$B$35,2,TRUE) does the same, provided the thresholds are sorted from smallest to largest.

3. Two-way match. You need a row and a column at the same time, like the ship rate for region North in weight band C. INDEX takes a grid plus a row number and a column number, and MATCH supplies both: =INDEX(E32:G35,MATCH(B38,D32:D35,0),MATCH(B39,E31:G31,0)) returns 41.00. Row first, then column, is the rule to say out loud while you type.

A fourth situation is really a variant of the first: the answer sits to the left of the key. In the customer table the region is in column E and the customer ID in column F. VLOOKUP can only return columns to the right of the key, so it cannot solve this. =INDEX($E$22:$E$29,MATCH(B4,$F$22:$F$29,0)) or =XLOOKUP(B4,$F$22:$F$29,$E$22:$E$29) can. Tests often include exactly one column like this to see whether you notice.

Approximate match: the largest threshold not above the value0%2%4%6%8%10%01,0002,0003,0004,0005,0006,000SO-5106: 2,082.50 → 2%SO-5110: 4,914.00 → 5%0% below 1,0008% from 5,000
Figure 1. The Northbeam discount tiers as steps. An approximate match walks right along the value axis and takes the step it is standing on: 2,082.50 gets 2 %, 4,914 gets 5 %.

Worked example: filling the Northbeam order list

Here are eight of the sixteen orders after all four columns are filled. The unit price comes from the product table, the order value is quantity times price, the discount comes from the tier table and the region from the customer table.

OrderCustomerProductQtyUnit priceOrder valueDiscountRegion
SO-5101C-104PW-123424.50833.000%North
SO-5102C-117SB-3015189.002,835.005%East
SO-5104C-140CB-556012.80768.000%North
SO-5105C-122LB-2030017.605,280.008%South
SO-5106C-117PW-128524.502,082.502%East
SO-5110C-104SB-3026189.004,914.005%North
SO-5112C-140PW-1216024.503,920.005%North
SO-5115C-145CB-5536012.804,608.005%South

Check a few rows by hand, because that habit catches most errors under time pressure. SO-5102 is 15 strap kits at 189.00 = 2,835.00, which is above 2,500 and below 5,000, so 5 %. SO-5105 is 300 label rolls at 17.60 = 5,280.00, the only order in the top 8 % tier. SO-5104 belongs to customer C-140, whose region in the left-hand column is North. If your sheet says anything else for these rows, the formula is wrong before you even look at it.

The formulas behind the whole sheet fit into one small table. Each one is written for row 4 and copied down to row 19, so the lookup ranges carry $ signs and the cell being looked up does not.

ColumnQuestionFormula in row 4 (copy down)
E Unit priceExact match on the product code=XLOOKUP(C4,$A$22:$A$27,$C$22:$C$27)
or =VLOOKUP(C4,$A$22:$C$27,3,FALSE)
F Order valueQuantity × price=D4*E4
G DiscountTier lookup, exact or next smaller=XLOOKUP(F4,$A$32:$A$35,$B$32:$B$35,,-1)
or =VLOOKUP(F4,$A$32:$B$35,2,TRUE)
H RegionAnswer sits left of the key=INDEX($E$22:$E$29,MATCH(B4,$F$22:$F$29,0))
or =XLOOKUP(B4,$F$22:$F$29,$E$22:$E$29)
B40 Ship rateTwo-way: region row × band column=INDEX(E32:G35,MATCH(B38,D32:D35,0),MATCH(B39,E31:G31,0))
Helper IGap to the next tier=IFERROR(INDEX($A$32:$A$35,MATCH(F4,$A$32:$A$35,1)+1)-F4,"top tier")

The judgement question: who is closest to the next tier?

Good tests often end with a question that cannot be answered by one function: sales wants to call the customer whose order sits closest below its next discount tier. For each order you need the next threshold above its value and the gap to it. A helper column does this cleanly: =IFERROR(INDEX($A$32:$A$35,MATCH(F4,$A$32:$A$35,1)+1)-F4,"top tier"). MATCH with type 1 finds the position of the current tier, +1 moves to the next one, and IFERROR catches the top tier, where there is no next threshold. Then =XLOOKUP(MIN(I4:I19),I4:I19,A4:A19) returns the order with the smallest gap; MIN skips the "top tier" text automatically.

Gap to the next discount tier (8 closest orders, $)0100200300400500600SO-5110 (to 5,000)86.00SO-5101 (to 1,000)167.00SO-5109 (to 1,000)172.00SO-5111 (to 1,000)208.00SO-5104 (to 1,000)232.00SO-5114 (to 1,000)244.00SO-5115 (to 5,000)392.00SO-5106 (to 2,500)417.50
Figure 2. The eight orders closest to their next tier. SO-5110 is only 86.00 short of 5,000, so it is the one to call.

The answer is SO-5110: 26 strap kits worth 4,914.00, just 86.00 below the 5,000 threshold. There is a nice twist worth mentioning if an interviewer asks you to explain your answer. At 5 % the customer pays 4,914 × 0.95 = 4,668.30. If the order were raised to exactly 5,000, the 8 % discount would make the net price 5,000 × 0.92 = 4,600.00, so the customer would get more goods and pay less. Being able to explain a result like that, not just compute it, is often what turns a correct sheet into a convincing one.

Net price: just below vs exactly at the 5,000 tier ($)02,0004,0006,0004,668.304,914 gross at 5% off4,600.005,000 gross at 8% off
Figure 3. Just below a tier can cost more than just above it: 4,914 at 5 % off is 4,668.30 net, 5,000 at 8 % off is 4,600.00 net.

Working under time pressure: a simple plan

Most candidates who struggle in a timed Excel exercise do not lack knowledge. They lose minutes by starting to type before they understand the sheet, by fixing the same error row by row instead of once at the top, or by polishing formatting while graded cells are still empty. A simple plan helps, and you can rehearse it in every case of this course.

Minute 1: map the sheet. Say to yourself which tables are inputs and which columns you must fill. Note the key column of each lookup table and whether it sits left or right of the answer. In the Northbeam file that takes a few seconds per table, and it already tells you that the region column needs INDEX/MATCH or XLOOKUP, not VLOOKUP.

Minutes 2 to 7: write one correct formula per column, then copy. Get row 4 completely right, with $ anchors on every lookup range, and only then fill down. One correct formula copied sixteen times is faster and safer than sixteen formulas typed separately, and if it is wrong you fix it once.

Minutes 8 to 10: the single-cell questions. The two-way ship rate and the judgement call are worth as much as a whole column in many scoring schemes, yet they take a minute each once the columns are filled. Do not leave them for last if you are slow.

The last two minutes: check, do not decorate. Show formulas with Ctrl+`, look for a row that differs from the others, and recompute one row by hand. Number formats are worth adding only when every graded cell has a value. If you run out of time on a question, leave a short note in a cell explaining the approach you would take; a reviewer reading your file can see your reasoning, even if the number is missing.

In a live interview you may also be asked to talk through your sheet. Practise saying each formula in plain words: "XLOOKUP finds the code in the product list and returns the price next to it."

How to do it in Excel, step by step

  1. Read the whole sheet first (about one minute). Find the lookup tables, note which column holds each key and which column holds each answer, and check whether the tier thresholds are sorted ascending.
  2. Click E4 and type =XLOOKUP(C4,, then select A22:A27 and press F4 (Mac: Cmd+T) to make it $A$22:$A$27. Add a comma, select C22:C27, press F4 again, close the bracket and press Enter.
  3. Click F4 and type =D4*E4.
  4. Click G4 and type =XLOOKUP(F4,$A$32:$A$35,$B$32:$B$35,,-1). The two commas skip the optional "if not found" argument.
  5. Click H4 and type =INDEX($E$22:$E$29,MATCH(B4,$F$22:$F$29,0)).
  6. Select E4:H19 and press Ctrl+D (Mac: Cmd+D) to copy all four formulas down at once.
  7. Format E:F as currency (Ctrl+Shift+4 on Windows) and G as a percentage (Ctrl+Shift+5).
  8. Press Ctrl+` to show formulas and scan the columns: every row should look identical except for the row number. Press Ctrl+` again to switch back.
  9. Spot-check two rows by hand, including one near a tier boundary, then answer the ship-rate and judgement questions.
If XLOOKUP returns #NAME?, the test file is opened in an Excel version without it. Switch straight to INDEX/MATCH or VLOOKUP instead of losing time.

Excel interview test practice sheet with order list, product and customer tables and discount tiers
Case 1 of the practice test: an order list on top, three small lookup tables underneath.

Common mistakes and how to spot them

  • VLOOKUP without FALSE. The fourth argument defaults to TRUE, an approximate match, which on an unsorted product list can return a wrong price without any error. Spot it by checking one price against the product table by eye.
  • Wrong column number. Counting from the sheet’s column A instead of from the first column of the lookup range. In $A$22:$C$27 the price is column 3.
  • Match mode 1 for tiers. It takes the next larger threshold, so SO-5102 at 2,835 gets 8 % instead of 5 %. Any order below 5,000 showing 8 % is the giveaway.
  • Missing $ signs. The lookup range slides down as you copy, and rows near the bottom return #N/A. If only the last few rows fail, check the anchors first.
  • Looking left with VLOOKUP. It returns the rep instead of the region, or #REF!. Use INDEX/MATCH or XLOOKUP.
  • Swapping row and column in INDEX. The ship rate comes back from the wrong cell or as #REF!. Say "row, then column" while typing.
  • Hiding errors too early. Wrapping everything in IFERROR(…,0) makes a missing product look like a free one. Only catch errors you expect, such as the top tier.

Quick reference: lookup functions and shortcuts

Function / shortcutUse it forWatch out for
XLOOKUPExact, left-facing and tier lookups in one function (Excel 365 and Excel 2021 or later)Match mode -1 = exact or next smaller, 1 = exact or next larger
VLOOKUP(…,FALSE)Exact match to the right of the keyOmitting FALSE means approximate match
VLOOKUP(…,TRUE)Tier lookupsThresholds must be sorted ascending
INDEX + MATCH(…,0)Any direction, works in every Excel versionMATCH type 0 for exact
INDEX(grid,row,col)Two-way lookupsRow number first, then column
IFERRORReplace #N/A or #REF! with a messageDo not hide errors you have not understood
F4 (Mac: Cmd+T)Cycle $A$1 / A$1 / $A1 / A1 while editing a referenceLock lookup tables before copying down
Ctrl+` (grave accent)Show formulas instead of resultsQuick audit before you hand in
F9 inside the formula barEvaluate a selected part of a formulaPress Esc afterwards, not Enter
Formulas > Evaluate FormulaStep through a nested formulaGreat for finding the wrong MATCH

Real-world uses

  • Pricing an order list. Sales operations teams fill unit prices and discounts from a master price list every day, exactly like columns E to G here.
  • Mapping customers to regions or reps. Reporting by region starts with one INDEX/MATCH column that attaches the region to each transaction.
  • Commission and bonus tiers. Any "from this amount upwards" rule, such as commission rates or volume rebates, is an approximate-match lookup.
  • Freight and rate cards. Shipping costs, insurance premiums and service fees are often grids of region × band, which is the two-way INDEX/MATCH pattern.
  • Upsell lists. The "closest below the next tier" logic produces a short list of customers for whom a small extra order makes sense.

What you will build in the rest of this course

Case 1 is free. Cases 2 to 8 are part of the full course, a one-time purchase of $9.90, and each one is a timed-style mini case with every cell graded and specific feedback on the classic traps.

Case 2: SUMIFS and COUNTIFS Report: you turn a list of 16 deals into a region × category revenue grid, count big deals, total a date range and average one rep’s deals, the conditional totals that appear right after lookups in many practice tests.

Case 3: IF, IFS, AND and OR Logic: you decide for eight reps who hit target, who earns a bonus, which commission tier applies and who is on hold, using nested conditions that stay readable.

Case 4: Percentages, Growth and the Classic Traps: shares of total, year-on-year growth, gross margin and reversing a discount, the percentage questions that are easy to get almost right.

Case 5: Text Cleanup and Concatenation: you clean a messy CRM export, fix names, flip "Last, First", pull email domains and build account codes.

Case 6: Date Calculations with EOMONTH, NETWORKDAYS and DATEDIF: due dates, days late, payment runs, project working days around holidays and full years of service.

Case 7: Pivot-Style Summary with Formulas: you rebuild a PivotTable with formulas, including totals, % of total, the top region and a COUNTIFS check.

Case 8: Mid-Course Mixed Assessment: a final assessment in which you clean, look up, price and schedule 12 orders and report three KPIs, eight graded cells in one sitting.

Summary

Lookup questions reward a calm routine: identify the pattern (exact, tier, left-facing or two-way), anchor the lookup tables with $, copy down, then spot-check one row by hand and one row near a boundary. Use FALSE or match type 0 for codes, -1 or TRUE for tiers, INDEX/MATCH whenever the answer sits to the left, and "row, then column" for grids. Now scroll up to the lab, set yourself a twelve-minute timer and fill the Northbeam order list. The Coach checks every graded cell and tells you which trap you fell into if a value is off.

Frequently asked questions

What Excel functions come up most in an Excel interview test?

Practice tests commonly cover lookups (XLOOKUP, VLOOKUP, INDEX/MATCH), SUMIFS and COUNTIFS, IF logic, percentages, text and date functions and pivot-style summaries. Every employer designs its own test, so practise the patterns rather than memorising questions.

Should I use XLOOKUP or VLOOKUP in an Excel test?

Use XLOOKUP if the test file runs in Excel 365 or Excel 2021 or later, because it looks left and handles tiers in one function. If it returns #NAME?, fall back to INDEX/MATCH or VLOOKUP with FALSE.

How do I look up a value to the left in Excel?

VLOOKUP cannot return a column left of the key. Use =INDEX(answer_range,MATCH(key,key_range,0)) or =XLOOKUP(key,key_range,answer_range).

How do I look up a discount tier based on an amount?

Use an approximate match on a threshold table sorted ascending: =XLOOKUP(amount,thresholds,rates,,-1) or =VLOOKUP(amount,table,2,TRUE). Both return the rate of the largest threshold that is not above the amount.

Why does my VLOOKUP return a wrong value without an error?

The fourth argument is probably missing, so VLOOKUP does an approximate match. Add FALSE as the last argument for exact matching on codes and IDs.

How do I do a two-way lookup with a row and a column?

Use =INDEX(grid,MATCH(row_key,row_labels,0),MATCH(col_key,col_labels,0)). INDEX takes the row number first and the column number second.

Keep going: Excel Interview Test Practice

This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time €9.90.

  1. Case 2: SUMIFS and COUNTIFS Report
  2. Case 3: IF, IFS, AND and OR Logic
  3. Case 4: Percentages, Growth and the Classic Traps
  4. Case 5: Text Cleanup and Concatenation
  5. Case 6: Date Calculations with EOMONTH, NETWORKDAYS and DATEDIF
  6. Case 7: Pivot-Style Summary with Formulas
  7. Case 8: Mid-Course Mixed Assessment
  8. Case 9: Data Quality Check: Duplicates, Blanks and Impossible Values
  9. Case 10: Ranking and Top-N with RANK.EQ, LARGE and INDEX/MATCH
  10. Case 11: Rounding, Cartons and Leftovers with ROUND, ROUNDUP, INT and MOD
  11. Case 12: Error Handling with IFNA, IFERROR and Contains-Text Checks
  12. Case 13: Dynamic-Array Answers with UNIQUE, FILTER and XLOOKUP
  13. Case 14: Break-Even, Target-Margin Price and Launch Scenarios
  14. Case 15: Running Totals, Month-on-Month Change and a Combo Chart
  15. Case 16: Take-Home Test: Q2 Sales Review
  16. Case 17: Two-Way Lookup on a Freight Rate Card with INDEX and Two MATCHes
  17. Case 18: Receivables Aging Report with Days Overdue, Buckets and SUMIFS
  18. Case 19: Tiered Commission with Marginal Rates, a Cap and a Stacked Chart
  19. Case 20: Final Take-Home Project: H1 Performance Dashboard

Buy course — €9.90 See the full course