
Step 1 of 7
Connect the Lists with a Reliable Key
Set up two related worksheet lists and establish why a shared, unique reference key is essential before adding lookup formulas.
Learning path · Level 4 · Tutorial 4
Connect a sales list to a product reference list on the same worksheet using exact-match lookups. Use VLOOKUP in Excel or Calc, compare XLOOKUP where supported, and diagnose missing or misleading results without hiding source-data problems.
Connect the Lists with a Reliable Key
Set up two related worksheet lists and establish why a shared, unique reference key is essential before adding lookup formulas. 3 min
Build an Exact-Match VLOOKUP
Write and test one exact-match VLOOKUP that retrieves the unit price for the first sales record. 4 min
Copy the Formula Without Shifting the Reference List
3 min
Retrieve the Same Values with XLOOKUP
Use XLOOKUP with aligned ranges, an explicit exact-match mode, and a clear missing-match message when your application supports it. 4 min
Choose a Compatible Lookup and Fallback
Select a lookup supported by the receiving application, use VLOOKUP as a compatible fallback for the key-left reference layout, and recognize when a left-return layout needs a separate working arrangement. 2 min
Diagnose Missing Matches Without Hiding Valid Zeros
Investigate unmatched lookup results through source evidence, and keep legitimate zero-valued returns distinct from missing records. 5 min
Verify and Finish Your Lookup Sheet
Complete a three-case audit of the local lookup worksheet, inspect copied formulas, and document the appropriate compatibility choice. 4 min

Step 1 of 7
Set up two related worksheet lists and establish why a shared, unique reference key is essential before adding lookup formulas.
A lookup uses a shared identifier to connect one record in the sales list to its corresponding record in the reference list. Here, Product ID is the shared lookup key: a sales record such as S001 | P102 connects to the reference record for P102.
A lookup returns one field from that matching reference record, such as its unit price. It does not add values or summarize repeated sales records.

Repeated keys in the sales list can point to one reference record.
Create a local workbook named ProductLookups.xlsx in Excel or ProductLookups.ods in Calc. Rename its worksheet to Lookups.
Enter the sales headers in A1:D1 exactly as shown in the first table. Enter the sales records in A2:B6, and leave columns C and D blank. Then enter the reference headers and records in F1:H5 from the second table. Product IDs are text. Unit prices are numeric USD values: use a decimal point, no currency symbol, and display two decimal places.
Enter the headers in row 1 and the records in A2:B6. Do not enter formulas or values in the two output columns yet.
| Row | Sale ID | Product ID | Unit price - VLOOKUP | Unit price - XLOOKUP |
|---|---|---|---|---|
| 2 | S001 | P102 | blank | blank |
| 3 | S002 | P104 | blank | blank |
| 4 | S003 | P999 | blank | blank |
| 5 | S004 | P101 | blank | blank |
| 6 | S005 | P102 | blank | blank |
Enter these headers and records in F1:H5. Keep the reference list separate from the sales list.
| Row | Product ID | Product | Unit price |
|---|---|---|---|
| 2 | P101 | Notebook | 4.50 |
| 3 | P102 | Pen | 1.20 |
| 4 | P103 | Folder | 2.75 |
| 5 | P104 | Sample | 0.00 |
Warning
Before adding formulas, visually inspect the Product ID values in the reference list: P101, P102, P103, and P104. Each appears once, so each key identifies one unambiguous reference record.
The sales list is different: P102 appears in two sales rows. That is expected because two separate sales can involve the same product.
Do not add a second P102 to the working reference list. If the reference list contained P102 | Pen | 1.20 and another P102 with price 1.50, an exact-match VLOOKUP or an XLOOKUP using its default search direction would return the first matching reference record. It cannot decide which conflicting price is correct.
Match each situation to the meaning that best describes it.
Tap an item and then its matching pair.
Write 2–4 sentences. Identify the lookup key, distinguish the repeated Product ID in the sales list from a conflicting duplicate in the reference list, and explain why accepting the first returned price would not safely resolve a second reference-list P102 with a different price.
Write at least 120 characters (0/120).

Step 2 of 7
Write and test one exact-match VLOOKUP that retrieves the unit price for the first sales record.
In ProductLookups.xlsx or ProductLookups.ods, work on the Lookups worksheet. The sales record in row 2 has Product ID P102 in B2. Its unit price belongs in C2.
VLOOKUP searches for a lookup key in the leftmost column of a lookup range, then returns a value from a column in that same matching row. Here, Product ID is in the leftmost column of the reference range, so the layout is suitable for VLOOKUP.

VLOOKUP finds the key in the first column of the lookup range and returns a value from the matching reference row.
A VLOOKUP formula has four arguments:
B2F2:H53FALSE for an exact matchThe range begins at column F, so its columns count as 1 = F, 2 = G, and 3 = H. The index is counted from the left edge of F2:H5, not from worksheet column A. Headers are excluded because the reference records begin in row 2.

Within F2:H5, the Unit price column H is return-column index 3.
Tip
Use FALSE to request an exact match. The equivalent exact-match value is 0, but this tutorial uses FALSE in completed VLOOKUP formulas.
Do not omit the fourth argument: leaving it out does not explicitly request an exact match and may produce misleading results. An exact-match VLOOKUP does not require the reference list to be sorted.
Select C2, enter the formula for your application, and press Enter. The formula uses the Product ID in B2, searches the reference records in F2:H5, and returns the Unit price from the range’s third column.
Use the separator your installed application accepts; its regional separator setting takes precedence.
Excel (comma separator)
=VLOOKUP(B2,F2:H5,3,FALSE)1.20
The displayed result should be formatted with two decimal places. Do not copy the formula down yet; the reference range will be stabilized in the next step.
Calc (semicolon separator)
=VLOOKUP(B2;F2:H5;3;FALSE)1.20
Use this form if your installed Calc separator setting uses semicolons. Do not copy the formula down yet.
Example
P102 matches the reference record for Pen, whose numeric Unit price is 1.20. The returned value is a price from one matching reference record; VLOOKUP does not add prices from repeated sales records.
Complete the exact-match VLOOKUP for cell C2. Use the Excel comma-separated form.
Fill all four arguments.
=VLOOKUP(,,,)
Step 3 of 7
Your formula in C2 must change the sales-row key as you fill downward, but it must keep pointing at the same reference list. Lock the whole lookup range with absolute references: $F$2:$H$5.
Enter the appropriate formula in C2, then copy or fill it down through C6. Your installed separator setting takes precedence.

The lookup value follows each sales row. The absolute lookup range stays on the four reference records.
Enter the version that matches your separator setting in C2, then fill C2 down through C6.
Excel / comma-separated:
=VLOOKUP(B2,$F$2:$H$5,3,FALSE)
Calc / semicolon-separated:
=VLOOKUP(B2;$F$2:$H$5;3;FALSE)1.20 0.00 #N/A 4.50 1.20
After filling C2 through C6, these are the displayed values in order. Format numeric prices with two decimal places.
A relative reference changes by the same row offset as the destination cell. That is useful for the sales key: B2 becomes B3, then B6. It is harmful for the reference list, because the lookup range would slide away from F2:H5.
Use the last copied formula in C6 as a quick audit: it should use B6 but still search the original reference range.
The examples use comma-separated Excel formulas. In Calc, the references change in the same way; only the separators may be semicolons.
| Copied cell | Range not locked | Range locked |
|---|---|---|
| C2 | =VLOOKUP(B2,F2:H5,3,FALSE) | =VLOOKUP(B2,$F$2:$H$5,3,FALSE) |
| C3 | =VLOOKUP(B3,F3:H6,3,FALSE) | =VLOOKUP(B3,$F$2:$H$5,3,FALSE) |
| C6 | =VLOOKUP(B6,F6:H9,3,FALSE) | =VLOOKUP(B6,$F$2:$H$5,3,FALSE) |
Tip
The repeated product ID P102 is a useful check: its two sales rows should retrieve the same price. A visible #N/A for the deliberately absent P999 is also evidence that the formula is still performing an exact lookup.
Complete the range in this copy-ready Excel formula for C2.
=VLOOKUP(B2,,3,FALSE)After you fill C2 through C6 in your local workbook, report all four checks:
Use the separator style used by your application.
Write at least 70 characters (0/70).

Step 4 of 7
Use XLOOKUP with aligned ranges, an explicit exact-match mode, and a clear missing-match message when your application supports it.
XLOOKUP is available in Microsoft 365, Excel for the web, Excel 2021/2024, and LibreOffice Calc 24.8 or later. Older installations may show an unrecognized-function error.
If XLOOKUP is unavailable, keep your completed VLOOKUP column. You can still follow the formula comparison and expected results in this step; an unavailable function does not mean that a product key is missing.

XLOOKUP pairs positions: the first lookup cell corresponds to the first return cell, and so on.
Unlike VLOOKUP, XLOOKUP receives separate ranges. The lookup range contains Product IDs; the return range contains Unit prices. Both ranges must cover the same records in the same order and have the same dimensions.
| Argument | Purpose | Value in D2 |
|---|---|---|
| lookup_value | Current sales key | B2 |
| lookup_array | Reference keys | $F$2:$F$5 |
| return_array | Prices to return | $H$2:$H$5 |
| if_not_found | Message for no match | "Not found" |
| match_mode | Explicit exact match | 0 |
In D2, use anchored reference ranges so they stay fixed when you copy down. The B2 reference remains relative and changes for each sales row.
Exact matching is XLOOKUP’s default, but match mode 0 makes the intention visible. The optional "Not found" argument changes only how a missing match is displayed; it does not create a missing product record.
Enter the version that matches your separator setting, then copy D2 through D6. Your installed separator setting takes precedence.
Use one formula version in D2, according to your separator setting.
Excel / comma-separated:
=XLOOKUP(B2,$F$2:$F$5,$H$2:$H$5,"Not found",0)
Calc / semicolon-separated:
=XLOOKUP(B2;$F$2:$F$5;$H$2:$H$5;"Not found";0)1.20
After entering either version in D2, the displayed result is 1.20. Copy the formula through D6 to retrieve the remaining rows.
These are the expected values in column D after copying, if XLOOKUP is supported. The zero for P104 is a returned price, while the absent P999 displays the chosen message.
| Sale ID | Product ID | D: Unit price - XLOOKUP |
|---|---|---|
| S001 | P102 | 1.20 |
| S002 | P104 | 0.00 |
| S003 | P999 | Not found |
| S004 | P101 | 4.50 |
| S005 | P102 | 1.20 |

Because its lookup and return ranges are separate, XLOOKUP can return a field to the left of the key. This is only a diagram; keep the working dataset unchanged.
Which range pair has the same number of cells but mismatched corresponding records?
Match each Product ID to the result that the completed XLOOKUP displays.
Tap an item and then its matching pair.
Complete the comma-separated formula for D2. It must use aligned anchored ranges, display the specified missing-match message, and state exact-match mode explicitly. If your Calc installation uses semicolons, use semicolons when entering the completed formula locally.
=XLOOKUP(B2,,,,)
Step 5 of 7
Select a lookup supported by the receiving application, use VLOOKUP as a compatible fallback for the key-left reference layout, and recognize when a left-return layout needs a separate working arrangement.
Choose the function for the application that will open the workbook—not only the application where you create it. If the receiving application does not recognize XLOOKUP, that is a function-support issue. It does not mean that a Product ID is absent from the reference list.
For this workbook’s reference layout, VLOOKUP is the practical compatibility fallback: Product ID is in the leftmost reference column and Unit price is to its right. Both functions retrieve the same valid prices; they present an unmatched key differently.
Use the receiving application’s support as the decision point.
| Receiving application | Compatible choice | Result for P999 |
|---|---|---|
| Supports XLOOKUP | XLOOKUP | Not found |
| Does not recognize XLOOKUP | VLOOKUP | #N/A |
| Supports either function | Either appropriate formula | Function-specific presentation |
To translate the current price lookup into VLOOKUP, identify the table that contains both the lookup key and the return field. In this worksheet, that table is F2:H5. Count return columns from the left edge of that selected range: F is column 1, G is column 2, and H is column 3.
Keep FALSE as the final argument for an explicit exact match. If your installation uses semicolons, use that separator; the installed separator setting takes precedence.

The return-column index is counted within F2:H5, not from worksheet column A.
In C2, use the formula that matches your separator setting. The anchored range remains stable when copied down the sales list.
Excel / comma-separated:
=VLOOKUP(B2,$F$2:$H$5,3,FALSE)
Calc / semicolon-separated:
=VLOOKUP(B2;$F$2:$H$5;3;FALSE)1.20
With B2 containing P102 and Unit price displayed to two decimal places, C2 shows 1.20.
Ordinary VLOOKUP searches the leftmost column of its lookup range and returns a value to its right. Therefore, it cannot directly replace a left-return XLOOKUP against an unchanged layout where the desired return field is left of the Product ID.
When a VLOOKUP fallback is required, create a compatible working reference layout: place the key first and the needed return field to its right. Preserve an unchanged source rather than overwriting or rearranging it.

Reorganize a working reference layout for VLOOKUP; do not overwrite an unchanged source.
Warning
Do not diagnose an unrecognized XLOOKUP by changing Product IDs or inventing a price. First identify the function-support issue. Then use the compatible VLOOKUP layout when one is available.
A colleague will open this workbook in an older application that does not recognize XLOOKUP. The reference list remains in F2:H5, with Product ID in column F and Unit price in column H. Which plan is appropriate?
Complete the comma-separated exact-match VLOOKUP fallback for C2. If your installed application uses semicolons, use semicolons when entering it locally.
=VLOOKUP(,,,)A separate source layout has Product in column F and Product ID in column G. You need to retrieve Product by Product ID in an application that supports VLOOKUP but not XLOOKUP.
State the required layout action before using VLOOKUP, and explain why the original source must be preserved.
Write at least 80 characters (0/80).

Step 6 of 7
Investigate unmatched lookup results through source evidence, and keep legitimate zero-valued returns distinct from missing records.
A missing exact match is a diagnostic signal, not a value to invent. First confirm that the formula is checking the intended reference list: the product keys are in F2:F5. Then inspect whether the sales key is present there and whether its characters and stored type truly match.
In this worksheet, P999 in B4 is deliberately absent from F2:F5. Therefore, leave it unresolved: VLOOKUP correctly shows #N/A, while the completed XLOOKUP can display Not found. The friendlier message changes presentation only; it does not create a reference record.

P999 has no corresponding product ID in the intended reference range F2:F5.
Use source evidence before changing a key or a formula.
| Check | What it establishes |
|---|---|
| Intended reference range | Confirm that the formula should search F2:F5. |
| Key presence | See whether the requested product ID exists there. |
| Exact characters | Look for leading or trailing spaces. |
| Stored data type | Verify whether each identifier is stored as text or as a number. |
| Source evidence | Correct only according to the identifier rule and the source record. |
Visually similar keys can still be different exact-match values. Keep diagnostic variants separate from the main dataset.
A sample key written as P102 has spaces around P102, so it is not the same key as P102. Inspect and correct spacing only when source evidence supports it.
Stored type matters too. Numeric 102 does not match text entered as '102. The leading apostrophe is an entry marker, not part of the stored text. Formatting a cell to look similar does not make the stored types consistent. In this worksheet, Product IDs follow the text identifier rule.
Also separate a missing match from a successful zero result: P104 exists in F5 and returns the numeric price 0.00 from H5. Zero is a valid price, not proof that the product is missing.

Extra spaces, inconsistent stored types, and a valid 0.00 result are different situations.
Warning
Do not replace every error with zero, and do not test only whether a returned price equals zero. Either approach would hide the difference between an absent record such as P999 and P104's legitimate price of 0.00. A Not found message is useful for presentation, but the source key still needs investigation.
Match each lookup situation to the most appropriate first check.
Tap an item and then its matching pair.
Write a short audit note for these four observations:
Match each of the first three observations to its appropriate check. Then justify why P999 should remain unresolved and explain why P104 must not be relabeled as Not found.
Write at least 220 characters (0/220).

Step 7 of 7
Complete a three-case audit of the local lookup worksheet, inspect copied formulas, and document the appropriate compatibility choice.
Use your local ProductLookups.xlsx or ProductLookups.ods workbook on the Lookups worksheet for this final check. Keep the reference list in F1:H5 unchanged.
Confirm the three meaningful cases against the reference list: P102 is a known match, P999 is absent, and P104 has a real numeric price of 0.00. A zero is a returned value, not evidence of a missing product.
Column C should contain the VLOOKUP results. If your application supports XLOOKUP, copy its formula through column D as well. Display unit prices with two decimal places.

Verify a known match, an absent key, and a legitimate zero against the reference list rather than judging by appearance alone.
Expected completed outputs when XLOOKUP is supported
| Sale ID | Product ID | C: VLOOKUP | D: XLOOKUP |
|---|---|---|---|
| S001 | P102 | 1.20 | 1.20 |
| S002 | P104 | 0.00 | 0.00 |
| S003 | P999 | #N/A | Not found |
| S004 | P101 | 4.50 | 4.50 |
| S005 | P102 | 1.20 | 1.20 |
Results alone are not enough: inspect the formula bar in the first and last filled cells. The product-ID reference changes from the first sales row to the last, while the reference-list ranges remain fixed.
Use the separator required by your installed application. The formulas below show comma-separated Excel forms and semicolon-separated Calc equivalents; your local separator setting takes precedence.
Compare the copied formulas
Excel / comma separators
C2: =VLOOKUP(B2,$F$2:$H$5,3,FALSE)
C6: =VLOOKUP(B6,$F$2:$H$5,3,FALSE)
D2: =XLOOKUP(B2,$F$2:$F$5,$H$2:$H$5,"Not found",0)
D6: =XLOOKUP(B6,$F$2:$F$5,$H$2:$H$5,"Not found",0)
Calc / semicolon separators
C2: =VLOOKUP(B2;$F$2:$H$5;3;FALSE)
C6: =VLOOKUP(B6;$F$2:$H$5;3;FALSE)
D2: =XLOOKUP(B2;$F$2:$F$5;$H$2:$H$5;"Not found";0)
D6: =XLOOKUP(B6;$F$2:$F$5;$H$2:$H$5;"Not found";0)Summary
Complete the two anchored ranges in this XLOOKUP structure. This is also the supported formula-structure check if your local application does not provide XLOOKUP.
=XLOOKUP(B2,,,"Not found",0)Write one concise audit record for your own Lookups worksheet.
Include: the reference price and observed lookup result for P102; the reference-list status and observed result for P999; and the reference price and observed result for P104. Then compare C2 with C6 and state which references stayed fixed and which row reference changed.
Finally, state whether your application supports XLOOKUP. If it does, compare column D with column C and note the missing-match display. If it does not, identify VLOOKUP as your compatible working approach and describe XLOOKUP as using separate lookup and return ranges with a missing-match message.
Write at least 260 characters (0/260).
Congratulations! You completed: Retrieve Exact Matches with VLOOKUP and XLOOKUP
20 XP
Thousands of online courses in video, ebooks and audiobooks.
To test your knowledge during online courses
Generated directly from your cell phone's photo gallery and sent to your email
Download our app via QR Code or the links below:.
+ 10 million
students
Free and Valid
Certificate
60 thousand free
exercises
4.8/5 rating in
app stores
Free courses in
video and ebooks