Lookup Functions

Learn to pull values from another table instead of copying them by hand. Write exact-match lookups with XLOOKUP, VLOOKUP, HLOOKUP and INDEX with MATCH or XMATCH, look up by row and column at once, and use approximate matches to place values in bands such as shipping costs by weight. Connect lookups to other sheets and files, handle values that are not found without hiding real errors, and fix lookups that fail or return the wrong result.

IntermediateLesson 3 of 7 in Spreadsheet Formulas and Functions Course

What you will learn

  1. Explain what a lookup does and why it beats copying values by hand, then use XLOOKUP to return matching values from a table in any direction, control how it matches, and avoid the data problems that make a lookup fail.
    • Understand how a lookup works
      Learn the parts of every lookup, how a lookup table should be laid out, and which lookup functions exist in which spreadsheet programs.
    • Write an exact-match XLOOKUP
      Build an XLOOKUP step by step, return values from a column to the left or from a whole row, and copy the formula without breaking its ranges.
    • Control matching and fix data that will not match
      Handle uppercase and lowercase, numbers stored as text, extra spaces, repeated keys and partial matches with wildcards, and choose the right search direction.
  2. Read and write the older lookup functions that appear in countless existing workbooks, set their match type deliberately, and know their limits so you can fix or replace them.
    • Look up values with VLOOKUP
      Write VLOOKUP with an exact match, count the column number correctly, and avoid the default approximate match, left-lookup limits and broken column numbers.
    • Look up across rows with HLOOKUP
      Use HLOOKUP for tables whose labels run across the top row, count the row number correctly, and replace it with XLOOKUP where that is more robust.
  3. Find the position of a value with MATCH or XMATCH, turn a position into a value with INDEX, and combine them for flexible lookups that work in every version, including lookups by row and column at once.
    • Find positions with MATCH and XMATCH
      Use MATCH and XMATCH to return where a value sits in a list, set their match types correctly, and use positions to test whether a value exists.
    • Return values with INDEX and MATCH
      Use INDEX to fetch a value by position and combine it with MATCH or XMATCH for lookups in any direction that survive inserted columns and work in every version.
    • Look up by row and column at once
      Find the value where a chosen row label and column header meet, using INDEX with two MATCH functions, nested XLOOKUP or VLOOKUP with MATCH.
  4. Use approximate matches to place a number or date in the right band, such as a shipping cost by weight or a discount by quantity, and set up band tables so the boundaries follow the rule you mean.
    • Find the band a value falls into
      Build a band table of lower limits and use VLOOKUP, MATCH or XLOOKUP to return the rate for the band a value belongs to, including values on a boundary.
    • Use next-larger matches, upper limits and dates
      Choose the smallest option that is large enough, write band tables with upper limits, and look up values that change on given dates.
  5. Connect lookups to tables on other sheets and in other files, respond to values that are not found in a way that keeps real errors visible, and troubleshoot or choose the right lookup for the job.
    • Look up data on another sheet or in another file
      Refer to tables on other sheets and in other workbooks, use names and tables so ranges stay correct as data grows, and know what breaks the links.
    • Handle values that are not found
      Replace #N/A with a clear result when a value is missing, choose between if_not_found, IFNA and IFERROR, and pick a replacement that does not distort later calculations.
    • Troubleshoot lookups and choose the right function
      Trace a failing lookup step by step, recognize wrong results that show no error, look up with two conditions, and choose the lookup function that fits the task and the software.

Lookup Functions study guide

5 chapters

1

Look up values with XLOOKUP

An order sheet needs current prices without repeated copying. Lookups connect each order to its source record, starting with a dependable key and an aligned return range. Learn how XLOOKUP finds a value, how to copy its formula safely, and how to choose the matching behavior you need. Then check the data issues that make two apparently identical keys fail to match, and the duplicate records that can return an unintended result.

1.1 Understand how a lookup works

A lookup brings a value from a source table into the place where you need it. An order can hold a product code while a formula fetches its price. The code identifies the record; the price is the result.

Follow the three parts

The lookup value is what you search for. The lookup range contains the keys to search. The return range contains the answers, in the same order as the keys. Finding the third key means returning the third answer. The answer need not be next to the key, but it must belong to the same record.

Use this product list in A1:D6:

CodeProductCategoryPrice
P-101Desk lampLighting24.90
P-102Office chairFurniture149.00
P-103Monitor standAccessories32.50
P-104WhiteboardSupplies58.00
P-105Cable trayAccessories18.75

If G2 holds "P-103", search A2:A6. It is the third key, so take the third price in D2:D6: 32.50. Row 1 holds headers and is left out of both ranges.

Keep a dependable source

A price list gives you one source of truth. Change a source price and the formulas show that new price after recalculation. A price copied by hand does not update. The formula also depends on its source: deleting a referenced source sheet breaks the reference and produces #REF!.

Choose unique keys, such as product codes or employee numbers. Two people can share a name, so a name alone may not identify the right person. If a key appears twice, an ordinary lookup returns one matching record, usually the first from the top. It does not add the records or warn that the key is repeated.

Build a table with one header row, one record per row, and one kind of information per column. Avoid merged cells and blank rows inside the list. Keep key types consistent: a numeric key and the same digits stored as text may look alike but fail to match.

Choose the kind of match

An exact match requires the key to equal the lookup value. Ordinary lookups ignore uppercase and lowercase. Exact matching suits IDs and codes because a nearby code belongs to another record.

An approximate match uses the exact key if present; otherwise it selects the next smaller or next larger key, according to the chosen mode. This suits bands, such as the shipping cost for a parcel whose weight falls between two limits. Approximate does not mean picking whichever number is closest.

Check the available functions
FunctionUseful job
XLOOKUPReturn values from a separate range in either direction
VLOOKUP / HLOOKUPRead existing tables by a column or row number
INDEX with MATCHFlexible lookups, including older Excel workbooks
MATCH / XMATCHReturn a position in a list

XLOOKUP and XMATCH are available in Excel for Microsoft 365, Excel 2021 and 2024, Excel for the web, Google Sheets, and LibreOffice Calc 24.8 onward. Excel 2019 and earlier need VLOOKUP, HLOOKUP, or INDEX with MATCH. The formulas here use English function names and commas between arguments.

Key Takeaways

  • A lookup searches a key range and returns the corresponding value from a return range.
  • Use unique, consistently stored keys and one record per row.
  • Exact matches suit identifiers; approximate matches suit bands.
  • Choose functions supported by the software that will open the workbook.

1.2 Write an exact-match XLOOKUP

XLOOKUP lets you point directly at the keys and answers. You do not need to count how many columns separate them, and exact matching is the default.

Build the first formula

The full syntax is:

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

The first three arguments identify what to find, where to search, and where to take the answer. Square brackets in syntax help mark optional arguments; do not type those brackets into a working formula.

Using the product list in A1:D6, put "P-103" in G2 and build the result in another cell:

  1. Type =XLOOKUP( and select G2.
  2. Add a comma and select A2:A6, the product codes.
  3. Add a comma and select D2:D6, the prices.
  4. Type ) and press Enter.

The completed formula is =XLOOKUP(G2, A2:A6, D2:D6). It finds "P-103" at position 3 and returns 32.50 from position 3 of the price range. With no optional arguments, it searches first to last and shows #N/A if no exact key exists.

You can also type the key directly: =XLOOKUP("P-103", A2:A6, D2:D6). Text constants need straight double quotes; a cell reference such as G2 does not. A numeric lookup value is entered without quotes.

Align the ranges

For a vertical lookup, select the same rows in both arrays. A2:A6 and D2:D6 both contain five cells. Selecting A1:A6 with D2:D6 includes an extra header on one side and produces #VALUE! in Excel. Equal length is necessary, and the first key must also correspond to the first answer.

The return column can be on either side. =XLOOKUP("Whiteboard", B2:B6, A2:A6) searches product names and returns "P-104" from the column on the left. The positions still line up because both ranges begin in row 2.

Copy without moving the table

Use =XLOOKUP(G2, $A$2:$A$6, $D$2:$D$6) when filling down an order list. The dollar signs lock the source ranges. One row down, the input becomes G3 while both source arrays stay fixed.

Without those locks, copying shifts the source to A3:A7 and D3:D7. The first product then falls out of the searched range. A formula can work in its first row and fail only after it is copied.

Return several fields or search a row

=XLOOKUP(G2, A2:A6, B2:D6) returns the matching product, category, and price. For "P-103", Excel fills three neighboring cells with "Monitor stand", "Accessories", and 32.50. This spill needs empty destination cells. Occupied cells block it and cause #SPILL!; keep the result outside an Excel table when it needs to spill.

Horizontal data works too. With "Jan", "Feb", and "Mar" in B1:D1 and sales 4200, 3850, and 4600 in B2:D2, =XLOOKUP("Feb", B1:D1, B2:D2) returns 3850. Here the arrays line up by column and must cover the same number of columns.

Key Takeaways

  • The first three XLOOKUP arguments are the value, keys, and answers.
  • XLOOKUP defaults to exact matching and first-to-last search.
  • Keep arrays aligned and lock source ranges before copying.
  • Separate arrays allow left lookups and horizontal lookups.
  • A multi-column return spills into neighboring cells and needs room.

1.3 Control matching and fix data that will not match

A lookup can fail even when a key looks right, or return the wrong record without showing an error. Check what is stored in the cells, then choose matching and search settings that fit the question.

Check the characters and data type

Ordinary exact matches ignore case: "p-103" finds "P-103". When capitals distinguish codes, Excel can use =XLOOKUP(TRUE, EXACT(A2:A6, G2), D2:D6). EXACT compares each code with G2 and returns TRUE only for the same characters and capitals. XLOOKUP then finds that TRUE.

The number 1001 differs from the text "1001". Left alignment and Excel's green warning triangle can suggest text digits, but check the stored type before changing data. When the keys are numbers and G2 holds text digits, =XLOOKUP(VALUE(G2), A2:A50, D2:D50) converts the input to a number.

Identifiers such as "00123" must stay text when every character matters. Numeric conversion loses the leading zeros. Excel also keeps only 15 significant digits in numeric input, so long card or account identifiers need text storage before entry. G2&"" turns a number into text, but it cannot recover zeros or digits already lost. Make the stored keys and the lookup value agree.

A trailing space changes "P-103" into "P-103 ". =LEN(G2) then returns 6 instead of 5. =XLOOKUP(TRIM(G2), A2:A6, D2:D6) removes ordinary spaces around the input. If the unwanted spaces are in the source keys, clean those keys too. TRIM does not remove every kind of imported whitespace.

Choose the first or last record

XLOOKUP normally returns the first match. In a log containing "P-101" at 22.50, "P-102" at 145.00, and "P-101" at 24.90 in A2:B4, a default lookup of "P-101" returns 22.50.

=XLOOKUP("P-101", A2:A4, B2:B4, "Not found", 0, -1) returns 24.90. The fifth argument, 0, keeps exact matching. The sixth, -1, searches last to first. That last matching record is the latest only when the log is ordered from oldest to newest.

Find part of a text value

Set match_mode to 2 to enable wildcards:

Pattern characterMeaning
*Any number of characters
?Exactly one character
~* or ~?A literal asterisk or question mark

=XLOOKUP("*chair*", B2:B6, D2:D6, "None", 2) finds "Office chair" and returns 149.00. Default exact mode treats * and ? as ordinary characters. Wildcard mode returns one matching item, not a list of all matches. The broad pattern "P-10?" fits every code in the product list and therefore returns the first.

Keep search mode separate from match mode

Match mode controls what qualifies; search mode controls how the list is searched. Default search mode 1 scans first to last and works on unsorted data. Search modes 2 and -2 use binary search for large lists and require ascending and descending order respectively. An incorrect sort order can produce a wrong result without an error.

Key Takeaways

  • Ordinary exact matches ignore case; EXACT can enforce case in Excel.
  • Match the stored data types and preserve meaningful leading zeros.
  • Check spaces with LEN and clean the side that contains them.
  • Search mode -1 returns the last matching record.
  • Wildcard match mode 2 enables *, ?, and ~.
  • Binary search requires the stated sort order.
2

Use VLOOKUP and HLOOKUP

Existing workbooks often use VLOOKUP and HLOOKUP to fetch values by a field number. Read those formulas from the edge of their selected table, with exact matching set deliberately. Work through vertical and horizontal layouts, then see how inserted columns or rows can leave a typed index pointing at the wrong field. Knowing these rules helps you maintain a working formula and decide when a direct-range lookup is easier to keep correct.

2.1 Look up values with VLOOKUP

VLOOKUP appears in many existing workbooks. It searches the leftmost column of a selected table and returns a field from the same row. Its two main traps are an omitted match setting and a column number counted from the wrong starting point.

Read the arguments

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

The table includes both the searched column and the answer column. Count the first column of that table as 1. In the product list A2:D6, Code is 1, Product 2, Category 3, and Price 4.

With "P-103" in G2, =VLOOKUP(G2, $A$2:$D$6, 4, FALSE) returns 32.50. VLOOKUP finds the code in column A, stays on that record's row, and takes the fourth field. Absolute references keep the table fixed when the formula is filled down.

If the table is B2:D6, its first field is Product. Price is now field 3, even though it is still worksheet column D. =VLOOKUP("Whiteboard", B2:D6, 3, FALSE) returns 58.00. The worksheet's column letters do not supply the index.

Enter the match type deliberately
Fourth argumentBehavior
FALSE or 0Exact match
TRUE or 1Exact or next smaller match
OmittedSame approximate behavior as TRUE

For IDs and codes, enter FALSE. Omitting it does not ask for an exact match. With sorted keys "P-101" through "P-105", the mistyped code "P-1035" can return the price 32.50 for "P-103". The formula looks successful even though the requested code is absent. Approximate matching needs the key column sorted ascending; unsorted data can give an incorrect row without warning.

Exact text matching ignores case and accepts wildcards. For example, =VLOOKUP("*stand*", B2:D6, 3, FALSE) returns 32.50 for "Monitor stand". Repeated keys return the first match, and text-versus-number differences or extra spaces can still cause #N/A.

Understand the direction and the index

VLOOKUP returns its first column or a column to the right. It cannot search the names in column B and return the codes in column A with an ordinary table range. Use XLOOKUP or INDEX with MATCH for that left lookup.

A typed index can become stale after a structural change. Insert a new column before Category and the table expands, but 4 still means its fourth field. Price is now fifth, so the formula may return "Accessories" instead of 32.50. A direct return-column reference avoids this, or let MATCH find the header:

=VLOOKUP(G2, $A$1:$D$6, MATCH("Price", $A$1:$D$1, 0), FALSE)

MATCH returns the position of "Price" within the table's full header width. As references adjust to an inserted column, it finds the new position.

Use errors to locate the fault

#N/A means no exact match, or no suitable lower key for an approximate match. #REF! occurs if the column index exceeds the table width: index 5 cannot fit A2:D6. #VALUE! occurs when the column index is below 1. Check the table and index before treating an error as a missing product.

Key Takeaways

  • VLOOKUP searches the first table column and returns the same row.
  • Count columns from the table edge, starting at 1.
  • Enter FALSE for codes: leaving it out selects approximate matching.
  • A typed column index can return the wrong field after insertion.
  • Use XLOOKUP or INDEX with MATCH when the answer is to the left.

2.2 Look up across rows with HLOOKUP

HLOOKUP searches across the top row of a table. It is useful when months, years, or other labels run from left to right, with a separate measure on each row below.

Read a horizontal table

=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

The first row of table_array holds the searched labels. Count that row as 1, including it in the return-row numbering. Consider a report in B1:D4, with measure names in column A:

MeasureJanFebMar
Sales420038504600
Costs290031003050
Visitors125011801320

The months are worksheet row 1; sales, costs, and visitors are rows 2, 3, and 4. =HLOOKUP("Feb", B1:D4, 3, FALSE) finds the February column and takes the third row of the selected table. The result is the February cost, 3100.

Count inside the selected range

The row index belongs to the table, not the worksheet. Move this entire table so the months begin in worksheet row 5. Months are still table row 1, sales row 2, and costs row 3. The table range becomes B5:D8, and =HLOOKUP("Feb", B5:D8, 3, FALSE) still returns 3100. Using worksheet row 7 as the index would exceed the four-row table and cause #REF!.

When copying a formula that searches the same report, lock its table, for example $B$1:$D$4. A changing input cell can remain relative.

Set matching and read errors

Use FALSE for an exact header such as "Feb". TRUE, or leaving the argument out, selects approximate matching and requires the top row to be sorted ascending. A normal calendar sequence of month names is not alphabetical order, so it is unsafe to rely on that default for this report.

HLOOKUP returns #N/A when an exact label is missing. An index larger than the table's height produces #REF!; an index below 1 produces #VALUE!. A typed index can also select a valid but unintended row, giving a wrong number without an error.

Point at the answer row with XLOOKUP

=XLOOKUP("Feb", B1:D1, B3:D3) searches the month labels and returns directly from the costs row. The arrays span the same columns. If a row is inserted above costs, the return reference adjusts to the costs cells. HLOOKUP's typed 3 still selects the third table row and may now select a different measure.

Shape of sourceOlder functionDirect-range option
Keys run downwardVLOOKUPXLOOKUP over columns
Keys run across the topHLOOKUPXLOOKUP over rows

A horizontal report can be convenient for reading. For a new source list that will grow, one record per row usually works better with filters, spreadsheet tables, and PivotTables. Choose the lookup according to the source's layout.

Key Takeaways

  • HLOOKUP searches the first table row.
  • Count return rows from the top of the table, including its header row.
  • Use FALSE for exact labels and lock the table when copying.
  • A direct XLOOKUP return-row reference handles row insertion more reliably.
3

Combine INDEX with MATCH and use XMATCH

A lookup can be built in two stages: locate the key, then retrieve the value at that position. MATCH and XMATCH perform the first stage; INDEX performs the second. Work from positions in a simple list to row and column positions in a grid. The same separation supports left lookups and workbooks shared with older Excel versions. Careful alignment matters because a valid position can still select the wrong cell in a different range.

3.1 Find positions with MATCH and XMATCH

MATCH and XMATCH answer a different question from XLOOKUP: where is the item in this range? They return a position. You can use that position to retrieve a value, choose a field, or check whether an item exists.

Count from the start of the range

=MATCH(lookup_value, lookup_array, [match_type])

With the product codes in A2:A6, =MATCH("P-103", A2:A6, 0) returns 3. The code is in worksheet cell A4, but it is the third item of the chosen range. If you include the header and search A1:A6, its position becomes 4. A position must always be interpreted relative to the range that produced it.

MATCH searches one row or one column. For an exact match, use 0 as the third argument. It returns the first match, ignores case, and accepts text wildcards. =MATCH("Mon*", B2:B6, 0) returns 3 for "Monitor stand".

Keep the MATCH modes straight
match_typeResultRequired order
0First exact matchAny order
1, or omittedExact or largest value below the inputAscending
-1Exact or smallest value above the inputDescending

Leaving the third argument out selects 1. That is useful for lower-limit bands, but dangerous for IDs: a missing code can produce a position for a different code. Enter 0 for an identifier even when the current list happens to be sorted.

Use XMATCH for modern matching

=XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])

XMATCH defaults to exact matching, so =XMATCH("P-103", A2:A6) returns 3. Its mode numbers follow XLOOKUP, not MATCH:

match_modeMeaning
0, or omittedExact
-1Exact or next smaller
1Exact or next larger
2Wildcard

With capacities 5, 10, 20, and 40 liters in K2:K5, =XMATCH(13, K2:K5, 1) returns 3. The 20-liter box is the smallest that can hold 13 liters. With ordinary search, XMATCH can find next-smaller or next-larger values in unsorted data too. MATCH needs a descending list and type -1 for this next-larger task; with capacities 40, 20, 10, 5, it returns position 2.

Change the search, not the numbering

XMATCH search mode -1 searches backward. For codes "P-101", "P-102", "P-101" in A2:A4, =XMATCH("P-101", A2:A4, 0, -1) returns 3. It finds the last occurrence but still counts from the start of the range.

Search modes 2 and -2 use binary search and require ascending and descending data respectively. They are separate from the match mode that chooses exact, smaller, larger, or wildcard matching.

Turn a position into an existence check

A missing exact key gives #N/A. =ISNUMBER(MATCH(G2, $A$2:$A$6, 0)) returns TRUE for a found code and FALSE for a missing one. ISNUMBER tests whether MATCH produced a numeric position; it does not test whether the code itself is numeric.

Key Takeaways

  • MATCH returns a range-relative position, not a worksheet row or a price.
  • MATCH needs 0 for an exact match; its default is approximate.
  • XMATCH defaults to exact and uses XLOOKUP-style match modes.
  • Reverse search still counts positions from the start.
  • ISNUMBER around an exact MATCH tests whether a key is present.

3.2 Return values with INDEX and MATCH

INDEX retrieves a value from a known position. MATCH supplies that position by finding a key. Combining the two makes a lookup with separate key and answer ranges, including a return column to the left.

Read INDEX by itself

=INDEX(array, row_num, [column_num])

In the product list, =INDEX(D2:D6, 3) returns 32.50, the third price. The position is relative to D2:D6, so 3 selects worksheet cell D4.

A rectangular array needs both coordinates. =INDEX(A2:D6, 3, 2) returns "Monitor stand": row 3 and column 2 inside that selected block. INDEX takes the row first and the column second. A requested position beyond the array gives #REF!.

Build the combination from the inside out

For "P-103" in G2, use:

=INDEX(D2:D6, MATCH(G2, A2:A6, 0))

  1. MATCH(G2, A2:A6, 0) searches the product codes exactly and returns 3.
  2. INDEX receives that 3 as its row position.
  3. INDEX(D2:D6, 3) returns 32.50.

The inner function produces a position, not a price. The outer function uses that position in the return range. This separation is why you can choose an answer column on either side of the keys.

For a left lookup, =INDEX(A2:A6, MATCH("Whiteboard", B2:B6, 0)) searches names in B and returns "P-104" from A. VLOOKUP cannot return that left-hand column using an ordinary table range.

Give both ranges the same starting point

Alignment is essential even when the formula produces no error. Compare these return ranges while keeping MATCH(G2, A2:A6, 0):

Return rangeWhat position 3 selectsResult
D2:D6D432.50
D1:D6D3149.00

The second formula returns the office chair's price. MATCH is correct, but the return range starts one row too early. Unlike an unequal-array XLOOKUP error, this mismatch can look like a valid answer. Use ranges covering the same source records, with the same height and starting row.

Keep it correct when copied or edited

Fill down with =INDEX($D$2:$D$6, MATCH(G2, $A$2:$A$6, 0)). The lookup cell changes on each row while both source ranges remain fixed. Keep MATCH's 0: leaving it out changes the lookup to approximate matching.

INDEX refers directly to the answer column, so inserting or deleting other columns lets its reference adjust. A VLOOKUP with a typed field number can select a different field after that same edit. Deleting the actual answer column still breaks the lookup.

Where XMATCH is available, =INDEX(D2:D6, XMATCH(G2, A2:A6)) gives the same result with exact matching by default. INDEX with MATCH works in every Excel version, Google Sheets, and LibreOffice Calc. It is a practical choice when a workbook must work in Excel 2019 or earlier; XLOOKUP is usually shorter in current Excel and provides its own missing-key argument.

Key Takeaways

  • INDEX retrieves a value by position; MATCH finds that position from a key.
  • Use 0 in MATCH for an exact lookup.
  • Align lookup and return ranges before nesting the functions.
  • Lock both source ranges when filling down.
  • INDEX with MATCH supports left lookups and older Excel versions.
  • Direct answer-column references adjust to changes in other columns.

3.3 Look up by row and column at once

A two-way lookup answers a question with two labels: which region, and which month? Find each label's position, then return the cell where those positions meet.

Set up a grid

Put regions in A2:A5, months in B1:D1, and sales in B2:D5:

RegionJanFebMar
North120135128
South98104110
East143151147
West879295

For East in February, follow East's row and February's column to 151.

Give INDEX two positions

=INDEX(B2:D5, MATCH("East", A2:A5, 0), MATCH("Feb", B1:D1, 0))

The first MATCH returns 3: East is third among the regions. The second returns 2: February is second among the months. INDEX therefore takes row 3, column 2 of the data block and returns 151.

The data block excludes the row labels and headers. Its four rows align with A2:A5; its three columns align with B1:D1. Positions must be measured from those same starting edges.

Swapping the MATCH functions does not always cause an error. Here it asks INDEX for row 2, column 3, which exists and contains South's March value, 110. Keep row first, column second even when both positions are small enough to fit either direction.

Use input cells

Put the selected region in H1 and month in H2:

=INDEX($B$2:$D$5, MATCH(H1, $A$2:$A$5, 0), MATCH(H2, $B$1:$D$1, 0))

Changing either input changes the result without editing the formula. Data-validation drop-down lists can offer the existing labels so entries match the source spellings.

Read two alternative formulas

A nested XLOOKUP can first return the region's row and then select the month:

=XLOOKUP("Feb", B1:D1, XLOOKUP("East", A2:A5, B2:D5))

The inner lookup produces East's row: 143, 151, 147. The outer one searches the three month labels and returns the second value, 151. Each array stage must have the same orientation and size as the labels it matches.

VLOOKUP can use MATCH for its field number:

=VLOOKUP("East", A1:D5, MATCH("Feb", A1:D1, 0), FALSE)

Here the table includes the region-label column. MATCH must therefore search the full width A1:D1, making February field 3. Searching only B1:D1 would return 2; VLOOKUP would then return East's January value, 143.

FormulaWhere February is counted fromPosition
INDEX over B2:D5B1:D1, the data columns2
VLOOKUP over A1:D5A1:D1, the whole table3

Key Takeaways

  • Two-way lookups find one row position and one column position.
  • INDEX takes the row position before the column position.
  • Align label ranges with the data block they describe.
  • A nested XLOOKUP can return a row and then select a field.
  • VLOOKUP with MATCH must count headers across the full table width.
4

Look up values in bands with approximate matches

A parcel weight or an order quantity rarely equals a listed band boundary. Approximate matching connects that input to the applicable rate, while a capacity lookup chooses an option large enough for a requirement. Read the table as a rule about intervals before selecting a mode. Work through lower limits, upper limits, and effective dates, paying attention to exact boundaries, missing end ranges, and each function’s sorting requirements.

4.1 Find the band a value falls into

A band table gives one result to every value in an interval. You can use it for shipping weights, quantity discounts, or other stepped rates. The lookup chooses a boundary; it does not round the input to a nearby number.

Store the start of each band

Use these lower limits and shipping costs in A2:B6:

Lower limit (kg)Cost
04.50
27.00
511.00
1018.00
2030.00

Each lower limit belongs to the band it starts. The first row covers 0 kg up to, but not including, 2 kg. The next covers 2 kg up to 5 kg. A 7.3 kg parcel belongs to the band beginning at 5 kg because 5 is the largest limit at or below 7.3.

Keep limits as numbers in their own column. A label such as "2–5 kg" is text, so it cannot serve as a numeric limit. Put display labels in a separate column if you need them.

Find the exact or next smaller limit

=VLOOKUP(7.3, $A$2:$B$6, 2, TRUE) returns 11.00. The input is absent, so the function selects the row beginning at 5 and returns its cost. TRUE explicitly requests the approximate behavior needed here.

The same result comes from:

  • =XLOOKUP(7.3, A2:A6, B2:B6, "No band", -1)
  • =INDEX(B2:B6, MATCH(7.3, A2:A6, 1))

MATCH returns position 3; INDEX returns the third cost. Notice the mode numbers: next smaller is -1 in XLOOKUP and XMATCH, but 1 in MATCH. VLOOKUP and HLOOKUP use TRUE for this behavior.

Test the edges

Exactly 5 kg costs 11.00 because a lower-limit band includes its starting value. A 4.99 kg parcel is still in the 2 kg band and costs 7.00. The last band starts at 20 kg and has no upper end, so 25 kg costs 30.00.

A value below the smallest lower limit has no qualifying row. If your table starts at 1 kg, a 0.4 kg parcel gives #N/A. Begin at the smallest relevant value, often 0, or give a clear missing-band message.

Apply the sorting rule

VLOOKUP with TRUE, HLOOKUP with TRUE, and MATCH with type 1 require ascending limits. Sort whole records so each cost stays with its limit. Unsorted limits can give a wrong answer without an error. XLOOKUP with match mode -1 and default search can find the correct lower limit in any order; binary search has its own sorting requirement.

Use a returned rate in a calculation

A quantity-discount table has limits 1, 10, 50, and 100 units with discounts 0%, 5%, 10%, and 15%. For 75 units, the qualifying lower limit is 50, so the discount is 10%. At 4.20 per unit, the net amount is:

75×4.20×(1−0.10)=283.50

An exact match would fail for 75 because that number is not a listed limit. Conversely, approximate matching on product codes can silently select a different product. Decide whether the input identifies a record or belongs in a band before choosing the mode.

Key Takeaways

  • A lower-limit band uses the largest limit at or below the input.
  • The boundary belongs to the band that starts there.
  • Next smaller is TRUE in VLOOKUP, 1 in MATCH, and -1 in XLOOKUP/XMATCH.
  • Older approximate lookups need ascending limits.
  • Store numeric limits separately from display labels.
  • Check the smallest input and the final band.

4.2 Use next-larger matches, upper limits and dates

Some lookups need a value large enough to meet a requirement. Others need the rule already in force on a date. Choose the boundary direction from the meaning of the table, then check exact endpoints.

Choose the smallest adequate option

Put box labels "S", "M", "L", and "XL" in A2:A5 and capacities 5, 10, 20, and 40 liters in B2:B5. A 13-liter load needs the smallest capacity at least as large as 13: the 20-liter box.

=XLOOKUP(13, B2:B5, A2:A5, "Too large", 1) returns "L". Match mode 1 means exact or next larger. Exactly 20 liters also returns "L". A 45-liter load returns "Too large" because no capacity can meet it.

XMATCH with mode 1 returns the selected position instead of the box label. VLOOKUP and HLOOKUP do not have a next-larger mode; their approximate setting chooses a key at or below the input.

Use MATCH with the right order

MATCH can find the next larger item with type -1, but its list must be descending. Sort the whole box table to XL 40, L 20, M 10, S 5. Then:

=INDEX(A2:A5, MATCH(13, B2:B5, -1))

MATCH returns 2, the position of 20 in this reordered list. INDEX returns "L". Using MATCH type -1 on the ascending list can give #N/A or an incorrect position. The negative mode means next larger in MATCH; it means next smaller in XLOOKUP and XMATCH.

Distinguish upper and lower limits

A shipping rule might say "up to and including 2 kg: 4.50; up to 5 kg: 7.00; up to 10 kg: 11.00; up to 20 kg: 18.00". These are upper limits. Select the smallest limit at or above the parcel's weight, using next larger.

Table meaningExactly 2 kgDirection
From 0 kg: 4.50; from 2 kg: 7.007.00Exact or next smaller
Up to 2 kg: 4.50; up to 5 kg: 7.004.50Exact or next larger

Both tables are valid; they express different rules. With upper limits ending at 20 kg, 25 kg has no band. Show a clear message or extend the table to cover the intended inputs. A lower-limit table's last row, by contrast, continues upward.

Look up the price in force on a date

Dates are stored as numbers, so start dates work as lower limits. Suppose prices are effective from January 1, 2026 at 2.10; April 1, 2026 at 2.25; and September 1, 2026 at 2.40.

Use next smaller to select the latest start date at or before the requested date. June 15, 2026 selects April 1 and returns 2.25. September 1 itself selects the new price of 2.40. Store real spreadsheet dates so chronological comparisons work.

Choose a search method

XLOOKUP and XMATCH next-larger or next-smaller modes work on unsorted data with ordinary search. Binary search modes 2 and -2 require ascending and descending arrays respectively. Choosing a direction of approximation does not remove that separate binary-search requirement.

Key Takeaways

  • Next larger selects the smallest value at or above the requirement.
  • Use XLOOKUP/XMATCH mode 1, or MATCH type -1 on descending data.
  • Upper-limit bands include their upper boundary.
  • Effective-from dates use next smaller.
  • Test out-of-range inputs and keep binary-search sorting separate.
5

Look up across sheets and handle missing values

Useful lookups often reach beyond the current sheet, into a shared source list or another file. Connect those sources with readable references and ranges that include new records. Then handle missing keys without concealing broken formulas or treating an unknown price as zero. Finish with a practical troubleshooting routine and two-condition lookups, so you can diagnose both visible errors and plausible values taken from the wrong record.

5.1 Look up data on another sheet or in another file

A lookup can use a table on another sheet without copying it beside the formula. Keeping the source separate makes a workbook easier to maintain, but you need references that stay aligned as the source changes.

Add the sheet name

A cross-sheet reference puts the sheet name before an exclamation mark: Products!A2:A6. Use single quotes when the name contains spaces or special characters, as in 'Price List'!A2:A6. While building a formula, click the source sheet and select its cells to let the spreadsheet write the reference.

On an Orders sheet, let A2 hold "P-102" and B2 hold quantity 3. The product list is on Products:

=XLOOKUP(A2, Products!$A$2:$A$6, Products!$D$2:$D$6)

This returns the unit price, 149.00. To return the line total, multiply by the quantity:

=B2*XLOOKUP(A2, Products!$A$2:$A$6, Products!$D$2:$D$6)

The result is 447.00. Copying down changes the order inputs while the source ranges stay fixed. A sheet name identifies the location; dollar signs control copying.

Use names or a growing table

Define Codes as Products!$A$2:$A$6 and Prices as Products!$D$2:$D$6. Then =XLOOKUP(A2, Codes, Prices) is easier to read. A name created from a selected range is absolute by default; check the name's actual definition because names can also contain relative references.

A fixed range does not grow just because new records appear below it. A product added in row 7 is outside $A$2:$A$6. In Excel, format the source as a table named Products and use =XLOOKUP(A2, Products[Code], Products[Price]). These structured references include new table rows automatically.

Whole-column references such as Products!A:A and Products!D:D also include new rows. Use corresponding full columns on both sides so their positions remain aligned.

Connect another Excel workbook

An external reference includes the file name in square brackets:

=XLOOKUP(A2, [Prices.xlsx]Products!$A$2:$A$6, [Prices.xlsx]Products!$D$2:$D$6)

Selecting the source range with both files open helps build it correctly. When the source closes, Excel shows its folder path. A moved, renamed, or deleted file can break updating and require a repaired link. Linked dynamic-array results that spill between workbooks require both workbooks open when refreshed.

Bring data into Google Sheets

Google Sheets uses IMPORTRANGE for a different spreadsheet. It takes the source URL and range text, for example =IMPORTRANGE(H1, "Products!A2:D100"), where H1 holds the source spreadsheet URL. The first connection shows #REF! until you choose Allow access.

After access is allowed, =VLOOKUP(A2, IMPORTRANGE(H1, "Products!A2:D100"), 4, FALSE) searches the imported table and returns its fourth field. The quoted range is text, not a direct local-sheet reference.

Renaming a local sheet updates direct references automatically. Deleting that sheet produces #REF!. Check the source location when a previously working lookup loses access to its table.

Key Takeaways

  • Use Sheet!range, with single quotes around sheet names containing spaces.
  • Lock source ranges while order inputs move.
  • Fixed ranges can miss added rows; Excel table columns grow with the table.
  • Names are only as stable as their definitions.
  • External workbooks depend on valid file links.
  • IMPORTRANGE connects Google spreadsheets and needs initial access approval.

5.2 Handle values that are not found

A missing key needs a clear result, but a broken formula needs attention. Handle those cases separately so an unknown product does not look like a free product and a bad reference does not look like an unknown one.

Replace the no-match case

#N/A means the lookup found no suitable match. The key may be absent, or it may differ in spelling, stored type, or spaces. Investigate an unexpected failure before deciding it is a new record.

XLOOKUP has a fourth argument for the no-match case:

=XLOOKUP(G2, $A$2:$A$6, $D$2:$D$6, "Not found")

It returns 32.50 for "P-103" and "Not found" for "P-109". This argument handles failure to find a key; a separate error such as #VALUE! from unequal array sizes still shows.

For older lookup formulas, use IFNA:

=IFNA(VLOOKUP(G2, $A$2:$D$6, 4, FALSE), "Not found")

IFNA replaces #N/A only. It can also wrap HLOOKUP or INDEX with MATCH. A #N/A already stored in a matched return cell is still an error value and can be caught by an outer IFNA; a lookup's own no-match argument describes a different event.

Keep formula faults visible

IFERROR replaces every error, including errors caused by broken references or incorrect arguments. Consider =IFERROR(VLOOKUP(G2, $A$2:$D$6, 5, FALSE), "Not found"). Column 5 does not exist in a four-column table, so the underlying error is #REF!, even for a valid code. IFERROR hides it under the message "Not found".

HandlerWhat it replaces
XLOOKUP if_not_foundNo matching key
IFNA#N/A from its expression
IFERRORAny error from its expression

Choose the narrow handler that fits the intended missing case.

Choose a useful replacement

A message is clear for someone reading a list. Zero is appropriate only when a missing result truly means zero. Returning 0 for an unknown price makes a total too low.

An empty string, "", looks blank but remains text. Multiplying a quantity by that text gives #VALUE!; SUM ignores cells containing text. Decide how later calculations should behave before replacing an error. A visually clean column can still hide missing amounts from a total.

Separate an empty field from a missing record

A found key with an empty category cell is not an unknown key. Excel normally returns 0 for a directly returned empty cell. This test can display a field-specific message:

=IF(XLOOKUP(G2, A2:A6, C2:C6)="", "No category", XLOOKUP(G2, A2:A6, C2:C6))

The IF checks the matched source value against empty text. It does not create a category or fill the source record.

Track unresolved entries

=IF(ISNA(MATCH(G2, $A$2:$A$6, 0)), "New code", XLOOKUP(G2, $A$2:$A$6, $D$2:$D$6)) checks for a missing code before retrieving its price. If results in H2:H50 use the message "Not found", =COUNTIF(H2:H50, "Not found") counts those unresolved lookups.

Band tables can also lack a result: below the first lower limit, or above the last upper limit. Extend the table where the rules support a band, or display "No band" so the input remains visible for review.

Key Takeaways

  • Investigate unexpected #N/A before calling the key missing.
  • Use XLOOKUP if_not_found for no key, or IFNA for #N/A.
  • IFERROR can hide broken references and argument faults.
  • A missing price is not automatically zero.
  • A found empty field differs from a missing record.
  • Count unresolved messages to keep missing data visible.
  • Check the uncovered ends of band tables.

5.3 Troubleshoot lookups and choose the right function

Troubleshooting starts by checking the key and ranges, not by hiding the error. Also test a few results that show ordinary values: some of the most costly lookup faults produce no error at all.

Trace a failed lookup
  1. Check whether the intended value is in the searched key column. =ISNUMBER(MATCH(G2, A2:A6, 0)) tests for an exact match.
  2. Compare stored types with =ISNUMBER(G2) and =ISNUMBER(A4) for the source cell you expect to match. A FALSE existence test can reflect mismatched types, not an absent record.
  3. Check spaces with =LEN(G2) and the source key's LEN result.
  4. Inspect endpoints and copied references. Include all source records and lock ranges that must stay fixed.
  5. Confirm the match mode. Identifiers need exact matching; bands need the appropriate smaller or larger boundary.
Read the error and check silent faults
ErrorCommon lookup cause
#N/ANo suitable key, mismatched text/number types, or extra spaces
#REF!Missing source or row/column index beyond the table
#VALUE!Unequal XLOOKUP arrays or a table index below 1
#NAME?Misspelled or unavailable function
#SPILL!Blocked multi-cell output in Excel

A wrong value without an error may come from approximate matching on codes, unsorted older approximate lookups, a broad wildcard, duplicate keys, misaligned INDEX/MATCH ranges, or reversed row and column positions. Compare a few results with the source by hand, including a boundary and a copied formula.

Match two conditions with one helper key

Suppose rows 2–6 contain Item in A, Size in B, and Price in C: "T-shirt" S 12.00; "T-shirt" M 12.00; "T-shirt" L 13.50; "Hoodie" M 29.00; "Hoodie" L 31.00. Looking up just "Hoodie" returns its first size, which may not be the requested size.

In D2, enter =A2&"|"&B2 and fill down. The helper key combines both fields, producing "Hoodie|L" for the last record. =XLOOKUP("Hoodie|L", D2:D6, C2:C6) returns 31.00.

Use a separator absent from the component values. Without one, "AB" joined to "C" and "A" joined to "BC" both become "ABC". A useful helper key must still identify one intended record.

Test both conditions directly in current Excel

=XLOOKUP(1, (A2:A6="Hoodie")*(B2:B6="L"), C2:C6)

Each comparison creates TRUE or FALSE for each row. Multiplying the comparisons produces 1 only where both are TRUE: here the array is 0, 0, 0, 0, 1. XLOOKUP finds 1 and returns the fifth price, 31.00. If several rows meet both conditions, this remains a single-result lookup and returns the first one by default.

Choose a function that fits

Use XLOOKUP for most new work in supported versions. Use INDEX with MATCH for older Excel compatibility or for a row-and-column lookup. Maintain VLOOKUP or HLOOKUP when an existing workbook relies on them, entering FALSE for IDs. Use MATCH or XMATCH when the needed result is a position or an existence test. Check the function against the software used by the people sharing the workbook.

Key Takeaways

  • Check presence, stored type, spaces, range coverage, and match mode in order.
  • A normal-looking value can still come from the wrong row or field.
  • Combine two conditions with a separated helper key or a Boolean product in current Excel.
  • A two-condition lookup still returns one record by default.
  • Choose functions that fit both the task and the receiving software.

Lookup Functions examples

5 Walkthroughs

1

Build a lookup you can trust

18 steps
Find a product’s price, copy the lookup, and check matching data and search settings.
  1. 1
    IntroductionBring a price into an order

    An order needs a product’s current price. Keeping the price in one source list lets a lookup retrieve it whenever the workbook recalculates.

    Start by identifying the key and its corresponding answer range. Then build an exact XLOOKUP and check what happens when you copy it, return several fields, or search data whose stored values differ from how they look.

  2. 2
    ExplanationIdentify the three parts

    A lookup value is what you search for. The lookup range contains the keys; the return range contains the answers in matching order.

    In the product list, codes occupy A2:A6 and prices occupy D2:D6. If G2 contains "P-103", search the codes for that value and return the price from the same position. Headers in row 1 are left out of both ranges.

  3. 3
    Key InsightOne key should identify one record

    A product code is useful because it can identify one record. A product name or category may repeat. A normal lookup returns one match, usually the first, so repeated keys can select the wrong record without an error.

    Keep one record per row and the same stored type throughout the key column. A formula can keep prices current, but it depends on the source being organized and available.

  4. 4
    ChallengeChoose a dependable key

    A staff list includes two employees named "Sam Lee" with employee numbers 317 and 842. An order needs one person’s department. Which field should identify the person?

    ---reveal---

    Use the employee number. The name selects more than one record, and a normal lookup would return only one of them. The unique number lets the formula select the intended employee’s own department.

  5. 5
    ExampleWrite the three required arguments

    Put "P-103" in G2. In the result cell, enter:

    =XLOOKUP(G2, A2:A6, D2:D6)

    Read the arguments in order: search for the value in G2, search among the product codes, and return from the prices. XLOOKUP defaults to exact matching and first-to-last search. A missing exact key returns #N/A unless you supply a missing-key result.

  6. 6
    ExampleFollow the matching position

    The codes in A2:A6 are "P-101", "P-102", "P-103", "P-104", and "P-105". The prices in D2:D6 are 24.90, 149.00, 32.50, 58.00, and 18.75.

    "P-103" is third, so XLOOKUP takes the third price, 32.50. This is why the arrays must line up. Adding a header to only one array changes its size and gives #VALUE! in Excel.

  7. 7
    TipLock the source before copying

    Use =XLOOKUP(G2, $A$2:$A$6, $D$2:$D$6) before filling down. The dollar signs lock both source arrays.

    One row down, G2 becomes G3, while the product list stays fixed. Without the locks, the source shifts to A3:A7 and D3:D7, dropping the first product. A formula that worked on its first row can then fail for a valid code.

  8. 8
    ConnectionChoose a return range on either side

    Separate arrays allow a left lookup:

    =XLOOKUP("Whiteboard", B2:B6, A2:A6)

    It searches product names in B and returns "P-104" from A. For horizontal data, the same idea works across columns: with "Jan", "Feb", "Mar" in B1:D1 and sales 4200, 3850, 4600 in B2:D2, =XLOOKUP("Feb", B1:D1, B2:D2) returns 3850.

  9. 9
    ExampleReturn several fields

    Change the return array to B2:D6:

    =XLOOKUP(G2, A2:A6, B2:D6)

    For "P-103", the result contains "Monitor stand", "Accessories", and 32.50. Excel spills these into neighboring cells. The result is several fields from one record, not all records with the same key. Leave room for the output; an occupied destination cell causes #SPILL!.

  10. 10
    ChallengePredict the copied formula

    You fill =XLOOKUP(G2, $A$2:$A$6, $D$2:$D$6) down one row. Which reference changes, and why?

    ---reveal---

    Only G2 changes, becoming G3. It is a relative reference and should read the next input. Both source arrays stay fixed because their row and column references are absolute. The copied formula searches the same complete product list for the new order’s code.

  11. 11
    ExplanationMake stored types agree

    The number 1001 and the text "1001" can look identical but fail an exact match. If the source keys are numbers, VALUE(G2) converts text digits in the input to a number.

    Keep IDs such as "00123" as text because the zeros matter. Numeric conversion loses them. Excel numeric input also preserves only 15 significant digits, so long identifiers need text storage before entry.

  12. 12
    TipCheck spaces and capitals

    =LEN(G2) returns 6 for "P-103 " but 5 for "P-103". TRIM(G2) can remove ordinary surrounding spaces from the input; spaces in source keys need cleaning there.

    Ordinary exact matches ignore case. When capitals distinguish Excel keys, =XLOOKUP(TRUE, EXACT(A2:A6, G2), D2:D6) looks for the TRUE produced by a case-sensitive comparison.

  13. 13
    ExampleEnable a partial text match

    =XLOOKUP("*chair*", B2:B6, D2:D6, "None", 2) returns 149.00 for "Office chair". The fifth argument, 2, enables wildcards.

    * matches any number of characters; ? matches one. Use ~* or ~? for a literal wildcard character. A broad pattern can fit several records: "P-10?" fits every product code here, so default search takes the first.

  14. 14
    ExampleRetrieve the last matching record

    A log in A2:B4 contains "P-101" at 22.50, "P-102" at 145.00, and "P-101" at 24.90. The default lookup for "P-101" returns 22.50.

    =XLOOKUP("P-101", A2:A4, B2:B4, "Not found", 0, -1) returns 24.90. The final -1 searches backward. It selects the latest entry only when the log is kept in oldest-to-newest order.

  15. 15
    Key InsightSeparate matching from searching

    Match mode controls which key qualifies; search mode controls how the list is searched. Their argument positions are different.

    Default search mode 1 scans first to last without needing sorted data. Binary search modes 2 and -2 need ascending and descending keys respectively. An unsorted array can give a wrong result under binary search even when the match mode is correct.

  16. 16
    ChallengeFix an apparent missing code

    G2 holds "P-103 " and the source key is "P-103". Both are text. A default XLOOKUP gives #N/A. What should you fix first?

    ---reveal---

    Remove the input’s trailing space, for example with TRIM(G2). Its extra character prevents an exact match. Changing to approximate matching would allow a different key to qualify and leave the real data mismatch unresolved. LEN can confirm that the two strings have different lengths.

  17. 17
    ChallengeChoose the intended repeat

    A rate log runs oldest to newest and stores the same code more than once. You need its newest exact rate and must copy the formula down an order list. What two formula choices matter?

    ---reveal---

    Use search mode -1 to select the last match, and lock both source ranges while leaving each order’s input relative. Exact matching keeps other codes out. Reverse search is a date choice here because the stated order makes the last matching row the newest.

  18. 18
    RecapCheck the lookup before relying on it

    Identify the input, the keys, and the answers. Align the arrays, use exact matching for IDs, and lock the source before copying.

    If the result is unexpected, inspect types and characters before changing modes. For repeated keys, choose which record you mean; for partial text, make the pattern specific enough to identify the intended result.

2

Read older lookup formulas correctly

11 steps
Count fields inside vertical and horizontal tables, choose exact matching, and recognize stale indices.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionFind the field a formula selects
  2. 2
    ExplanationCount from the table’s first column
  3. 3
    Key InsightSet FALSE for identifiers
  4. 4
    ExampleChange the table edge
  5. 5
    TipKeep an index tied to the right header
  6. 6
    ChallengeCount a field inside a shifted table
  7. 7
    ExampleRead a horizontal report
  8. 8
    Key InsightKeep table rows separate from sheet rows
  9. 9
    ConnectionPoint directly at the costs row
  10. 10
    ChallengeDiagnose a plausible wrong number
  11. 11
    RecapRead the selected table before the index
3

Build a lookup from positions

14 steps
Use MATCH and INDEX separately, combine them, and extend the method to a two-way grid.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionFind a position, then retrieve a value
  2. 2
    ExampleRead a position within a range
  3. 3
    ExplanationCompare the modern default
  4. 4
    ChallengeCheck presence without retrieving a field
  5. 5
    ExampleUse INDEX on a known position
  6. 6
    ExampleLet MATCH supply the position
  7. 7
    Key InsightCheck which record position 3 means
  8. 8
    ChallengeRepair the shifted return range
  9. 9
    ExplanationAdd a column position
  10. 10
    ExampleRetrieve the grid intersection
  11. 11
    ConnectionSelect a row, then a month
  12. 12
    TipMatch the outer function’s counting edge
  13. 13
    ChallengeExplain the wrong month
  14. 14
    RecapKeep the position and range together
4

Choose the right boundary for a band

12 steps
Work through shipping limits, capacity requirements, and prices that change on dates.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionRead what the limit means
  2. 2
    ExplanationRead a lower-limit shipping table
  3. 3
    ExampleRetrieve the qualifying cost
  4. 4
    Key InsightA starting boundary belongs to its new band
  5. 5
    TipKeep limits numeric and records together
  6. 6
    ChallengeTest both sides of a limit
  7. 7
    ExampleChoose a box large enough
  8. 8
    ConnectionUse MATCH’s different next-larger rule
  9. 9
    Key InsightRead “up to” as an upper limit
  10. 10
    ExampleFind the price already in force
  11. 11
    ChallengeMatch the rule to its direction
  12. 12
    RecapCheck meaning, mode, and endpoints
5

Connect sources and diagnose lookup problems

16 steps
Use other sheets, handle unresolved values, and check both visible errors and wrong records.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionKeep the source connected and errors useful
  2. 2
    ExampleReference another sheet
  3. 3
    ExampleUse the returned price in an order
  4. 4
    TipInclude records added later
  5. 5
    ConnectionKnow which kind of source link you use
  6. 6
    ChallengeExplain a newly missing product
  7. 7
    ExplanationLabel the no-match event
  8. 8
    ExampleExpose an error hidden by IFERROR
  9. 9
    Key InsightChoose what later calculations should see
  10. 10
    ChallengeKeep a formula fault visible
  11. 11
    ExplanationTrace an unexpected missing match
  12. 12
    TipInspect ordinary-looking results too
  13. 13
    ExampleMake both fields part of the key
  14. 14
    ExampleFind the row where both tests pass
  15. 15
    ChallengeRepair the lookup and its hidden error
  16. 16
    RecapCheck the record, source, and missing case

Lookup Functions practice questions

40 Practice Questions in 4 sets

Set 1: Choose modes and connect source tables10 Practice Questions

Question 1 of 10

An Excel XLOOKUP finds one record and returns three adjacent fields. The next cell in its output area contains a note. What error can the blocked result show?
  1. #N/A
  2. #VALUE!
  3. #REF!
  4. #SPILL!
Show answerHide answer
Answer: D
The three-field result needs neighboring cells for its spill, and the note blocks that output area. Clear or move the note so Excel can place all returned fields. A missing-key error would mean no suitable record was found; it would not describe occupied destination cells.

Question 2 of 10

Source keys are the text IDs "0047" and "0048". The lookup cell stores numeric 47. What data repair preserves the IDs and makes the first record match?
  1. Convert both source IDs to numbers.
  2. Store the input as the text "0047".
  3. Use VALUE on both source IDs.
  4. Append empty text to numeric 47.
Show answerHide answer
Answer: B
The source ID includes two meaningful leading zeros, so the input must contain the same text characters, 0047. Appending empty text to numeric 47 produces the text 47; it cannot restore zeros that are absent. Converting the source IDs to numbers would discard their intended form.

Question 3 of 10

A sorted code table contains "C-210", "C-220", and "C-230". An exact code is required, but a formula is =VLOOKUP(H2, A2:C4, 3). How should it be changed to reject an unknown code between existing codes?
  1. Add FALSE as the fourth argument.
  2. Add TRUE as the fourth argument.
  3. Keep three arguments and sort descending.
  4. Keep three arguments and lock the range.
Show answerHide answer
Answer: A
Omitting VLOOKUP’s fourth argument requests approximate matching, so an unknown code can use the preceding key’s record. Adding FALSE requires an exact key and makes an unknown code return #N/A. Locking the range helps with copying but does not change which keys qualify.

Question 4 of 10

A capacity list contains 9, 18, 36, and 72 liters in J4:J7. What does =XMATCH(25, J4:J7, 1) return?
  1. 18
  2. 36
  3. 3
  4. 2
Show answerHide answer
Answer: C
XMATCH mode 1 selects the exact value or next larger capacity, so it chooses 36 liters. It returns that item’s position, 3, not the capacity itself. Position 2 identifies 18 liters, which would be too small for the requested 25 liters.

Question 5 of 10

Rows A3:A5 are "Red", "Blue", "Green"; headers B2:D2 are "Apr", "May", "Jun". The data rows are Red 20, 25, 28; Blue 31, 35, 39; Green 42, 46, 49. =VLOOKUP("Green", A2:D5, MATCH("May", B2:D2, 0), FALSE) returns 42. What single range change makes the intended lookup correct?
  1. Change the table to B2:D5.
  2. Change the MATCH range to A2:D2.
  3. Change the MATCH range to C2:D2.
  4. Change the table to A3:D5.
Show answerHide answer
Answer: B
MATCH currently gives 2 because May is second in B2:D2. VLOOKUP counts from column A, so field 2 is April and returns 42; searching A2:D2 makes May field 3 and returns 46. Removing the table’s header row does not fix this horizontal counting mismatch.

Question 6 of 10

An ascending discount table starts bands at 1, 20, 60, and 120 units, with discounts 0%, 4%, 9%, and 14%. An order has 80 units at 2.50 each. What is its amount after the band discount?
  1. 172.00
  2. 192.00
  3. 18.00
  4. 182.00
Show answerHide answer
Answer: D
An order of 80 uses the band starting at 60, so the discount is 9%. The gross amount is 200.00 and keeping 91% gives 182.00. Using the 120-unit band would give 172.00, but a lower-limit band cannot apply before its starting quantity.

Question 7 of 10

Service fees are effective from February 1, 2026 at 6.20, May 1 at 6.80, and November 1 at 7.10. What fee applies on August 12, 2026?
  1. 6.20
  2. 7.10
  3. 6.80
  4. No matching fee
Show answerHide answer
Answer: C
The applicable start date is the latest one at or before August 12, which is May 1. Its fee is 6.80 and remains in force until November begins. Selecting November’s 7.10 would apply a future fee; an exact-only date match would miss the existing effective-date band.

Question 8 of 10

A source sheet is named "Supplier Rates". How should a direct formula reference its cells A2:A20?
  1. 'Supplier Rates'!A2:A20
  2. "Supplier Rates"!A2:A20
  3. 'Supplier Rates'!"A2:A20"
  4. Supplier Rates!A2:A20
Show answerHide answer
Answer: A
Put the sheet name in single quotes because it contains a space, then add the exclamation mark and the range. Double quotes would mark a text value rather than the sheet-name part of a direct reference. The range itself is not quoted in a direct worksheet reference.

Question 9 of 10

A source is an Excel table named Rates with columns Code and Amount. An order code is in A2. What formula keeps including records appended to that table?
  1. =XLOOKUP(A2, Rates!$A$2:$A$30, Rates!$B$2:$B$30)
  2. =XLOOKUP(A2, $A$2:$A$30, $B$2:$B$30)
  3. =XLOOKUP(A2, Rates[Amount], Rates[Code])
  4. =XLOOKUP(A2, Rates[Code], Rates[Amount])
Show answerHide answer
Answer: D
Structured references use the table’s full Code and Amount columns, so appended table records join the lookup automatically. A fixed endpoint such as row 30 remains fixed and can exclude later records. Reversing the two table columns would search amounts instead of the order code.

Question 10 of 10

A price list has Item, Color, and Amount in A:C. Rows 2–5 are "Mug", "Blue", 8.00; "Mug", "Red", 9.00; "Plate", "Red", 12.00; "Mug", "Red", 10.00. =XLOOKUP(1, (A2:A5="Mug")*(B2:B5="Red"), C2:C5) is used in current Excel. What result does it return, and why?
  1. 10.00, because the last qualifying row wins.
  2. 9.00, because the first qualifying row wins.
  3. 8.00, because the first item match wins.
  4. 19.00, because qualifying amounts are added.
Show answerHide answer
Answer: B
The two comparisons qualify rows 3 and 5, producing 1 at both positions. Default XLOOKUP returns the first 1, so the result is 9.00. It does not automatically prefer the last record or add duplicate matches; both conditions narrow the records but do not make them unique.
Set 2: Build and read everyday lookups10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

An employee list includes two people named "Alex Chen". Each has a different employee number. What should an expense sheet use to look up each person’s department?
  1. The employee’s first name
  2. The employee’s full name
  3. The employee’s number
  4. The employee’s department
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A supply sheet uses formulas to retrieve unit prices from a separate source table. A source price changes from 16.00 to 17.50. What does a linked lookup show after recalculation?
  1. The updated price, 17.50
  2. The original price, 16.00
  3. A missing-key error, #N/A
  4. Both prices in adjacent cells
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

An order code is in H4. The source codes occupy B3:B12, and their unit prices occupy E3:E12. What formula can be filled down while keeping the entire source fixed?
  1. =XLOOKUP($H$4, B3:B12, E3:E12)
  2. =XLOOKUP(H4, $B$3:$B$12, $E$4:$E$13)
  3. =XLOOKUP(H4, B3:B12, E3:E12)
  4. =XLOOKUP(H4, $B$3:$B$12, $E$3:$E$12)
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A table occupies D6:G14: Code, Description, Unit, and Rate, in that order. With a code in J6, what formula returns its exact rate?
  1. =VLOOKUP(J6, D6:G14, 7, FALSE)
  2. =VLOOKUP(J6, D6:G14, 4, FALSE)
  3. =VLOOKUP(J6, D6:G14, 3, FALSE)
  4. =VLOOKUP(J6, D6:G14, 4, TRUE)
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

In C5:E8, the top row is "Apr", "May", "Jun". The next rows hold output, defects, and hours. Defects are 8, 6, and 9. What does =HLOOKUP("May", C5:E8, 3, FALSE) return?
  1. The defect count, 6
  2. The defect count, 8
  3. The defect count, 9
  4. A row-index error, #REF!
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

Cells F8:F11 contain "K-8", "K-2", "K-6", and "K-9". What does =MATCH("K-6", F8:F11, 0) return?
  1. 10
  2. 6
  3. 3
  4. 2
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

Cells B5:B7 hold "R-4", "R-9", "R-2"; F5:F7 hold 26, 41, 18. What does =INDEX(F5:F7, MATCH("R-9", B5:B7, 0)) return?
  1. 2
  2. 26
  3. 18
  4. 41
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A fee table has lower limits 0, 3, 8, and 15 kg with fees 5.00, 9.00, 14.00, and 22.00. What fee applies to exactly 8 kg?
  1. 9.00
  2. 14.00
  3. 22.00
  4. 5.00
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

Containers hold 6, 12, 24, and 48 liters. Which capacity is the smallest suitable container for 17 liters?
  1. 24 liters
  2. 12 liters
  3. 48 liters
  4. 6 liters
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A four-column table has numeric prices in its fourth column and contains code "V-8". An order uses =IFERROR(VLOOKUP(H2, $A$2:$D$20, 5, FALSE), 0) and shows a total of 0 for that code. What repair both retrieves valid prices and labels missing codes without hiding the index fault?
  1. Keep index 5 and replace IFERROR with IFNA.
  2. Keep IFERROR and change the index to 4.
  3. Use index 4 inside IFNA with "Unknown code".
  4. Use index 5 and change the replacement to "Unknown code".
Show answerHide answer

Save this lesson to see this answer.

Set 3: Find faults that ordinary results can hide10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A lookup source uses one row per employee. Employee numbers are unique, but departments repeat. The report needs a person’s start date. Why is department an unsafe lookup key?
  1. A department cannot be stored as text.
  2. A lookup cannot search a repeated value.
  3. Department names require approximate matching.
  4. Several employees can share one department.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A log has Code, Date, and Rate in A:C. Rows 2–4 are "D-7", September 8, 2026, 44.00; "D-3", September 10, 2026, 30.00; "D-7", September 2, 2026, 41.00. A reverse exact XLOOKUP for "D-7" returns 41.00. What is needed to make reverse search select the newest rate?
  1. Sort complete records by date, oldest to newest.
  2. Sort only the Rate column, smallest to largest.
  3. Sort complete records by date, newest to oldest.
  4. Sort only the Code column, A to Z.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A horizontal table starts at E9:H12. Its first row contains years, followed by Orders, Returns, and Hours. Which row index retrieves Returns?
  1. 11
  2. 2
  3. 3
  4. 4
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

Keys in C4:C6 are "N-1", "N-2", "N-3". Amounts in F4:F6 are 15, 28, 33; F3 contains "Amount". For "N-2", =INDEX(F3:F6, MATCH(H2, C4:C6, 0)) shows 15. What repair addresses the cause?
  1. Change MATCH to approximate type 1.
  2. Change INDEX’s range to F4:F6.
  3. Change MATCH’s range to C5:C7.
  4. Subtract 1 from MATCH’s position.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A grid has rows "Oak", "Pine", "Birch" and columns "Q1", "Q2", "Q3". The rows contain 11, 14, 17; 22, 25, 28; 33, 36, 39. Which two INDEX positions retrieve Birch in Q2?
  1. Row 2, column 3
  2. Row 3, column 3
  3. Row 2, column 2
  4. Row 3, column 2
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

An ascending quantity table in J2:K5 holds limits 1, 25, 70, 140 and discounts 0%, 6%, 11%, 16%. The copied formula for 90 units uses =VLOOKUP(H9, J3:K6, 2, FALSE) and gives #N/A. What formula change both fits the discount rule and preserves the complete source when filled down?
  1. Use J3:K6 with TRUE.
  2. Use $J$2:$K$5 with FALSE.
  3. Use $J$2:$K$5 with TRUE.
  4. Use $J$3:$K$6 with FALSE.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

The first IMPORTRANGE connection between two Google spreadsheets shows #REF! and a request to connect the sheets. What action completes that initial connection?
  1. Choose Allow access.
  2. Convert keys to text.
  3. Wrap it in IFERROR.
  4. Sort the imported rows.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A missing price is replaced with empty text "" in J2. What happens to =4*J2 and to a SUM over cells including J2?
  1. Both treat the empty text as numeric zero.
  2. Multiplication gives #VALUE!; SUM skips the text.
  3. Multiplication skips it; SUM gives #VALUE!.
  4. Both preserve the original missing-key error.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

In current Excel, columns A:C contain Zone, Tier, and Fee. Rows 2–5 are "AB", "C", 5.00; "A", "BC", 7.00; "AB", "D", 9.00; "A", "BD", 11.00. A helper key =A2&B2 makes a lookup for zone "A", tier "BC" return 5.00. What repair keeps every listed zone/tier combination distinct without moving the records?
  1. Search the existing helper keys from last to first.
  2. Append "|" after each existing combined helper key.
  3. Insert "|" between fields only in the lookup input.
  4. Insert "|" between fields in both keys and input.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

Excel 2019 users must open a workbook. The source has employee names in column D and their unique IDs in column B. Which approach supports an exact lookup from name to ID in that version, when the names are unique in this source?
  1. XLOOKUP over columns D and B
  2. VLOOKUP over columns B through D
  3. INDEX of B with an exact MATCH in D
  4. XMATCH in D used as the final ID
Show answerHide answer

Save this lesson to see this answer.

Set 4: Apply lookup rules to changing workbooks10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

What result type does =XMATCH("Closed", F2:F15) return when it finds that text?
  1. The text "Closed"
  2. A range-relative position
  3. The worksheet row number
  4. The neighboring cell’s value
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

An order list uses each row’s code from column H. Source codes are in B4:B8 and prices in E4:E8. Row 10 uses =XLOOKUP(H10, B4:B8, E4:E8). After filling to row 12, the code stored in B4 gives #N/A. What should be entered in the original formula before filling again?
  1. =XLOOKUP($H$10, B4:B8, E4:E8)
  2. =XLOOKUP(H10, $B$4:$B$8, $E$4:$E$8)
  3. =XLOOKUP(H10, $B$4:$B$8, E4:E8)
  4. =XLOOKUP($H$10, $B$4:$B$8, $E$4:$E$8)
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A source contains the literal product label "Kit?". What XLOOKUP pattern in wildcard mode searches for that exact question-mark character?
  1. "Kit*"
  2. "Kit?"
  3. "Kit~?"
  4. "Kit~*"
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

An Excel table range is A1:D9, headed Code, Item, Unit, Rate. A new field is inserted before Rate. Which design continues finding Rate by its header as references expand?
  1. Use MATCH("Rate", full_header_range, 0) as VLOOKUP’s index.
  2. Keep VLOOKUP’s typed index 4 and add FALSE.
  3. Keep VLOOKUP’s typed index 4 and add IFNA.
  4. Use MATCH("Rate", headers_excluding_Code, 0) as the index.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

An exact HLOOKUP uses index 3 to return a costs row. A new row is inserted between its header and sales rows, shifting costs from table row 3 to row 4. The formula still returns a number. What change most directly avoids this kind of typed-index fault on future insertions?
  1. Switch HLOOKUP’s last argument to TRUE.
  2. Keep index 3 and lock the table range.
  3. Wrap the existing HLOOKUP in IFNA.
  4. Use XLOOKUP with headers and the costs row as its arrays.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A workbook uses =INDEX(F4:F18, MATCH(J4, B4:B18, 0)). A column is inserted before column D. The key and return cells are retained. What behavior should you expect?
  1. The typed field number becomes one too small.
  2. MATCH changes from exact to approximate.
  3. The return range stops including its first record.
  4. The direct return reference adjusts to its new column.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

Row labels in A2:A4 are "Alpha", "Beta", "Gamma". Months in B1:D1 are "Jul", "Aug", "Sep". The data rows are 16, 19, 23; 27, 31, 34; 38, 42, 47. You need Gamma in August. A formula uses INDEX on B2:D4, then MATCH("Aug", B1:D1, 0), then MATCH("Gamma", A2:A4, 0). What does it return, and what change retrieves the requested intersection?
  1. 34; swap the two MATCH arguments.
  2. 42; keep the argument order unchanged.
  3. 47; change both MATCH modes to 1.
  4. 31; include headers in the data block.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A delivery rule charges 6.00 up to and including 4 kg, 10.00 up to 9 kg, and 17.00 up to 18 kg. Limits are stored as 9, 4, 18 with the corresponding fees 10.00, 6.00, 17.00. Which setup gives correct fees for 4 kg and 6 kg without reordering the table?
  1. XLOOKUP mode -1, default search: 6.00 and 6.00.
  2. VLOOKUP TRUE, existing order: 6.00 and 10.00.
  3. XLOOKUP mode 1, default search: 6.00 and 10.00.
  4. XLOOKUP mode 1, binary ascending search: 6.00 and 10.00.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

An exact XLOOKUP in Excel displays 0 for customer "U-6". That code has a source row whose Category cell is empty. The formula’s if_not_found value is "Unknown ID". What display rule should show "No category" for this case?
  1. Use if_not_found to display "No category".
  2. Test the returned field for empty text and display "No category".
  3. Use IFNA to display "No category".
  4. Use IFERROR to display "No category".
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A valid code gives "Unknown" from =IFERROR(XLOOKUP(H2, B2:B12, E3:E12), "Unknown"). H2 and its matching source key are text with no extra spaces. What repair fixes the source problem while keeping later formula faults visible?
  1. Keep the ranges and use an empty-string replacement.
  2. Convert both keys to numbers and keep IFERROR.
  3. Keep the ranges and use XLOOKUP’s no-match argument.
  4. Align the return range to E2:E12 and use the no-match argument.
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

65 Key Terms, each with its definition

A

Absolute reference
An absolute reference locks both a cell’s row and column with dollar signs, keeping that cell reference fixed when a formula is copied.
An absolute reference such as $A$2:$A$6 stays fixed while the order’s relative input moves down.
Aligned arrays
Aligned arrays have corresponding positions that describe the same records, with matching dimensions along the searched direction.
The aligned arrays A2:A6 and D2:D6 pair each product code with its price on the same source row.
Approximate match
An approximate match uses an exact key if present, otherwise the next smaller or next larger key according to its mode.
An approximate match places a 7.3 kg parcel in the band beginning at 5 kg, even though 7.3 is not listed.
Ascending order
Ascending order places values from smallest to largest, or text in increasing alphabetical order, within the searched range.
Approximate VLOOKUP needs the numeric limits in ascending order, with each cost attached to its limit.

B

Band table
A band table assigns a result to each interval of a scale by listing boundary values and their corresponding rates or labels.
The shipping band table pairs numeric weight limits with costs, giving one cost to each interval.
Binary search
A binary search searches a sorted array by narrowing the search interval, requiring the order specified by its search mode.
Binary search mode 2 needs ascending keys; using it on an unsorted list risks incorrect results.
Boolean product
A Boolean product multiplies TRUE/FALSE comparison arrays, producing 1 where all tested conditions are TRUE and 0 elsewhere.
A Boolean product of item and size tests lets XLOOKUP find 1 on a row where both fields match.

C

Case-sensitive comparison
A case-sensitive comparison treats uppercase and lowercase letters as different characters when testing text values.
A case-sensitive comparison with EXACT distinguishes "Ab7" from "AB7" when capitals identify different records.
Column index
A column index is a field’s position counted from the left edge of a selected table, with the first field numbered 1.
Price has column index 4 in A2:D6, but index 3 when the selected table begins in column B.
Compatibility
Compatibility means the receiving spreadsheet software supports the functions and behavior required by a shared workbook.
For compatibility with Excel 2019, an exact left lookup can use INDEX with MATCH instead of XLOOKUP.
Cross-sheet reference
A cross-sheet reference names a worksheet before a range so a formula can use cells on a different sheet in the same file.
The cross-sheet reference Products!D2:D6 supplies prices while the order formula stays on Orders.

D

Data block
A data block is the grid of return values, with label ranges aligned to its rows and columns for a two-way lookup.
In a sales grid whose region labels and month headers sit outside B2:D5, that range is the data block.
Data-validation list
A data-validation list offers permitted cell entries, helping users choose lookup labels that match the source spellings.
A data-validation list in H2 can offer the same "Jan", "Feb", and "Mar" labels that a lookup grid uses.
Descending order
Descending order places the searched values from largest to smallest, as required by MATCH’s next-larger type -1.
MATCH type -1 needs the box capacities in descending order: 40, 20, 10, 5.

E

Effective date
An effective date is the date from which a value or rule applies, serving as a lower boundary in a date-based lookup.
An effective date of April 1 sets the price for June 15 when the next listed change begins in September.
Empty string
An empty string is text containing no characters, displayed as a blank but still different from a truly empty cell or numeric zero.
Replacing an unknown price with the empty string "" lets SUM skip it but makes multiplication fail.
Exact match
An exact match requires the searched value to equal a source key; ordinary spreadsheet lookup comparisons ignore case.
An exact match finds "p-103" as "P-103", but an unknown code does not select a neighboring product.
Existence check
An existence check tests whether a suitable key occurs in a range without needing to retrieve a neighboring field.
An existence check with ISNUMBER around an exact MATCH returns TRUE when the requested code is found.
External workbook link
An external workbook link refers to cells in another Excel file and depends on a valid source file location for updating.
An external workbook link to [Prices.xlsx]Products!A2:A6 may need repair after the source file moves.

F

Fixed range
A fixed range has specific endpoints that do not automatically include records added below or beside those endpoints.
A new product on row 7 lies outside the fixed range $A$2:$A$6, so the lookup cannot find its code.

H

Header row
A header row contains the names of a table’s columns or measures, helping identify the fields stored beneath each label.
The monthly report’s header row holds the month labels that HLOOKUP searches to select a column.
Helper key
A helper key combines two or more source fields into one identifier so a lookup can search for their combination.
The helper key "Hoodie|L" combines Item and Size to distinguish the large hoodie’s price.
HLOOKUP
HLOOKUP searches the first row of a selected table and returns a value from the matching column using a table row index.
=HLOOKUP("Feb", B1:D4, 3, FALSE) uses HLOOKUP to retrieve February’s costs from the third table row.
Horizontal lookup
A horizontal lookup searches labels across a row and returns corresponding values from another row or table field.
A horizontal lookup searches "Feb" across B1:D1 to select the corresponding value in the costs row.

I

if_not_found argument
The if_not_found argument supplies XLOOKUP’s result when no key matches, while separate formula errors remain visible.
The if_not_found argument can show "No band" for a missing limit without hiding an unequal-array error.
IFERROR
IFERROR replaces any error from its expression, including missing-key errors and faults caused by broken lookup formulas.
IFERROR can turn a bad fifth-column request in a four-column table into the message "Not found".
IFNA
IFNA replaces an expression’s #N/A error with a supplied value while allowing other error types to remain visible.
IFNA labels an absent VLOOKUP code while leaving an invalid column index’s #REF! error visible.
IMPORTRANGE
IMPORTRANGE imports a range from another Google spreadsheet using its source URL and a text description of the range.
An order sheet can use IMPORTRANGE with "Products!A2:D100" after its first access request is allowed.
INDEX
INDEX retrieves the value at a specified row and, for a rectangular array, column position within the selected array.
=INDEX(A2:D6, 3, 2) uses INDEX to return the product name in the third record’s second field.
INDEX with MATCH
INDEX with MATCH combines position-finding in a key range with value retrieval at that position in a separate return range.
INDEX with MATCH finds "Whiteboard" in the name column and returns its code from the column to the left.
Intersection
An intersection is the cell shared by a selected row and column in a grid, which supplies a two-way lookup’s result.
In a region-by-month sales grid, East’s row and February’s column have an intersection at East’s February sales of 151.

L

Left lookup
A left lookup searches a key column and returns a field from a column positioned to the left of those keys.
Returning the code in A from a product name in B is a left lookup that an ordinary VLOOKUP cannot perform.
Lookup
A lookup searches for a key in a row or column and returns the corresponding value from another row or column.
An order uses a lookup to fetch a product’s current price from the source list instead of copying it.
Lookup range
A lookup range is the row or column searched for the lookup value, with positions counted from its start.
When the product codes in A2:A6 form the lookup range and "P-103" is listed third, "P-103" has position 3 within it.
Lookup value
A lookup value is the item a formula searches for, such as a product code, employee number, or selected month.
With "P-103" entered in G2, the lookup value is the product code held in that input cell.
Lower limit
A lower limit marks the start of a band and belongs to that band when the rule applies from the limit onward.
In a shipping band that starts at 5 kg and costs 11.00, the lower limit 5 kg covers a parcel of exactly 5 kg as well as one of 7.3 kg.

M

MATCH
MATCH returns a value’s position in one row or column, with an explicit third argument of 0 needed for exact matching.
=MATCH("P-103", A2:A6, 0) uses MATCH to return 3 although the matching code is in worksheet row 4.
Match mode
A match mode specifies which keys qualify, such as exact keys, wildcard matches, or the next smaller or larger key.
XLOOKUP match mode 2 lets the pattern "chair" find a product whose name contains "chair".
Match type
A match type is MATCH’s third argument: 0 requests exact, 1 next smaller, and -1 next larger, including exact keys.
MATCH match type -1 needs descending values; XLOOKUP uses mode 1 for that same next-larger direction.
Missing-key result
A missing-key result occurs when no qualifying source key is found, which differs from finding a record with an empty field.
A missing-key result can display "Not found" for "P-109" while known codes still return normal prices.

N

Named range
A named range gives a cell range a readable name whose actual reference determines where formulas search or return values.
The named range Prices can point to Products!$D$2:$D$6 to make an order’s lookup easier to read.
Nested function
A nested function is a function used inside another function, supplying a result that the outer function then uses.
In an INDEX lookup, the nested function MATCH supplies the position that the outer INDEX retrieves.
Next larger
A next-larger match selects the smallest key above the input when no exact key is present, often for capacity requirements.
A next-larger lookup for 13 liters selects the 20-liter box from capacities of 5, 10, 20, and 40 liters.
Next smaller
A next-smaller match selects the largest key below the input when no exact key is present, as needed for lower-limit bands.
A next-smaller lookup for 7.3 selects 5 from limits 0, 2, 5, 10, and 20, keeping the input in its started band.
Number stored as text
A number stored as text contains digit characters but has a text type, so it can differ from the equivalent numeric value.
The number stored as text "1001" can fail to match numeric 1001 despite displaying the same digits.

R

Range lookup argument
The range lookup argument selects exact matching with FALSE or approximate matching with TRUE in VLOOKUP and HLOOKUP.
Leaving VLOOKUP’s range lookup argument out selects approximate matching; FALSE requests an exact code.
Record
A record is the collection of related fields describing one item, normally kept together in one row of a lookup list.
The code, product name, category, and price on row 4 all belong to the same product record.
Relative position
A relative position counts an item from the start of a selected range, independently of its worksheet address.
A code in A4 has relative position 3 in A2:A6, but 4 when the searched range includes the header in A1.
Return range
A return range contains the answers that correspond by position to the keys in the searched row or column.
The third key in A2:A6 selects the third price from the aligned return range D2:D6.
Row index
A row index is a position counted from the top of the selected table, including its first row as position 1.
In a report whose third table row holds costs, costs keep row index 3 when the report moves so its header begins on worksheet row 5.

S

Search mode
A search mode controls how a lookup scans the keys, such as first to last, last to first, or by binary search.
Search mode -1 retrieves the last matching entry, independently of whether matching is exact.
Separator
A separator is a character placed between joined fields to keep their boundaries clear and prevent ambiguous combined keys.
The separator "|" makes "AB|C" differ from "A|BC"; joining either pair without it would give "ABC".
Silent lookup error
A silent lookup error is an unintended result that appears as an ordinary value because the formula can still return a valid cell.
A silent lookup error can return the office chair’s price when a shifted range should return the monitor stand’s.
Source of truth
A source of truth is the maintained source table whose current values supply the linked results elsewhere in a workbook.
The price list is the source of truth: editing it updates the linked order prices after recalculation.
Spill
A spill is an array formula’s output spreading across neighboring cells to display more than one returned value.
A three-field XLOOKUP result needs room for its spill to display the product name, category, and price.
Structured reference
A structured reference names an Excel table or one of its columns and adjusts to include records added to that table.
The structured reference Products[Price] includes prices for records appended to the Excel table.

T

Table array
A table array is the rectangular range supplied to VLOOKUP or HLOOKUP, including both searched labels and return fields.
For the table array B2:D6, Product is field 1 and Price is field 3, regardless of worksheet letters.
Trailing space
A trailing space is a space after the visible characters of a text value, which can make an otherwise identical key fail to match.
A trailing space makes "P-103 " six characters long, so it fails to match the five-character code "P-103".
Two-way lookup
A two-way lookup returns the grid cell selected by both a row label and a column header, using their intersection.
In a region-by-month sales grid where East sold 151 in February, a two-way lookup for "East" and "Feb" retrieves 151.

U

Unique key
A unique key identifies just one record in the source table, preventing ambiguity between records with the same label.
An employee number is a unique key that distinguishes two people named "Alex Chen" in the staff list.
Upper limit
An upper limit marks the end of a band and includes that endpoint when the rule says up to and including the limit.
When a first shipping band costs 4.50 up to and including 2 kg, the upper limit 2 kg keeps a parcel of exactly 2 kg in that band.

V

VLOOKUP
VLOOKUP searches the first column of a selected table and returns a field from the matching row using a column index.
=VLOOKUP(G2, A2:D6, 4, FALSE) uses VLOOKUP to return the exact code’s fourth table field.

W

Wildcard
A wildcard is a pattern character that stands for other characters when the function’s wildcard matching is enabled.
The wildcard pattern "P-10?" fits several codes, so its first match may be an unintended product.

X

XLOOKUP
XLOOKUP searches one array and returns a matching position from a separate array, using exact matching by default.
=XLOOKUP(G2, A2:A6, D2:D6) uses XLOOKUP to retrieve the price for the product code in G2.
XMATCH
XMATCH returns a position with exact matching by default and offers next-smaller, next-larger, wildcard, and reverse searches.
XMATCH with mode 1 selects the position of the smallest listed capacity that can hold 13 liters.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started