Syntax or pattern
Search a lookup range and return a matching value from another range.
=XLOOKUP(search_key, lookup_range, result_range, [missing_value])5 practical examples
Use XLOOKUP to find a product price
Return the matching product price from a lookup table.
=XLOOKUP(A2, Products!A:A, Products!B:B, "Not found")Adjust the ranges, criteria and sheet names to match your workbook.
Use XLOOKUP for employee details
Find a department, manager, or role from an employee ID.
=XLOOKUP(E2, Staff!A:A, Staff!C:C, "Check ID")Adjust the ranges, criteria and sheet names to match your workbook.
Use XLOOKUP with a status table
Convert status codes into readable labels.
=XLOOKUP(B2, StatusMap!A:A, StatusMap!B:B, "Unknown")Adjust the ranges, criteria and sheet names to match your workbook.
Use XLOOKUP to pull a category
Return a category for reporting and summaries.
=XLOOKUP(A2, Items!A:A, Items!D:D, "No category")Adjust the ranges, criteria and sheet names to match your workbook.
Use XLOOKUP with imported data
Look up a value from an imported or shared tab.
=XLOOKUP(A2, Imported!A:A, Imported!B:B, "Missing")Adjust the ranges, criteria and sheet names to match your workbook.
Common mistakes to avoid
- Using lookup ranges and return ranges with different row counts.
- Leaving extra spaces in lookup values.
- Forgetting a fallback value when a lookup can be missing.
FAQ
What is this Google Sheets page for?
This page gives copy-ready examples for xlookup examples so you can understand the pattern and adapt it to real spreadsheet work.
Can I copy these formulas directly?
Yes. Use the copy buttons, then adjust sheet names, ranges, criteria and column references for your own file.
Why does my formula return an error?
The most common causes are mismatched ranges, missing quotes around text criteria, blank source data, or references that do not match your sheet layout.
Here are some ideas for you
Optional resources that may help if you are learning Google Sheets, building trackers, creating dashboards or improving spreadsheet workflows.
- Google Sheets booksSee ideas
Learn formulas, workflows and dashboards with structured examples.
- Spreadsheet dashboard booksSee ideas
Improve how you design trackers, summaries and reporting sheets.
- Keyboard shortcut guidesSee ideas
Build speed with navigation, editing and formatting shortcuts.
- Numeric keypadsSee ideas
Useful if you enter numbers often on a laptop or compact keyboard.
- External monitorsSee ideas
Helpful for viewing data, formulas and dashboards side by side.
- Desk notebooksSee ideas
Sketch formulas, tracker layouts and reporting ideas before building.
Some links in this section may be affiliate links. Choose only what is useful for your own work.