Look up values with XLOOKUP and VLOOKUP in Sheets
Use XLOOKUP, VLOOKUP, and INDEX with MATCH in Foxcolab Sheets to pull a matching value from a table, and fix
Updated 3 min read
In short
To look up a value in Foxcolab Sheets, use XLOOKUP: =XLOOKUP(F2, A2:A50, C2:C50, "Not found") finds F2 in column A and returns the value from the same row of column C. VLOOKUP, HLOOKUP, INDEX with MATCH, and XMATCH also work. With VLOOKUP, always end with FALSE for an exact match. Matching ignores capital letters, but spaces count.
Key takeaways
- XLOOKUP matches exactly by default, can return columns to the left, and takes a value to show when nothing is found.
- VLOOKUP needs FALSE as its last argument for an exact match. Without it, it assumes a sorted first column.
- INDEX with MATCH, and XMATCH, give you a row number to use in other formulas.
- Lookups ignore capital letters, but a trailing space or a number stored as text stops a match.
- Formulas are calculated in your browser, and your spreadsheet stays end-to-end encrypted.
Last reviewed 3 December 2026
XLOOKUP in Foxcolab Sheets finds a value in one column and returns the matching value from another, such as the price for a product code or the email address for a name. VLOOKUP, HLOOKUP, INDEX with MATCH, and XMATCH work too. Sheets calculates every formula in your browser, so your tables stay end-to-end encrypted while you look things up.
The examples below use this price list:
| A | B | C | |
|---|---|---|---|
| 1 | SKU | Product | Price |
| 2 | FX-100 | Desk lamp | 1499 |
| 3 | FX-205 | Monitor stand | 2350 |
| 4 | FX-310 | Cable tray | 640 |
Look up a value with XLOOKUP#
Put the value to find in a cell
For example, type FX-205 in F2.
Start the formula
In G2, type =XLOOKUP( or pick XLOOKUP from Functions in the toolbar. A hint shows each argument as you type.
Add the ranges
Finish the formula as =XLOOKUP(F2, A2:A50, C2:C50, "Not found"). That's the value to find, the column to search, the column to return from, and the text to show when there's no match.
Press Enter
G2 shows 2350. Change F2 and the result follows.
The search and return ranges must be the same height. XLOOKUP has two more optional arguments:
| Argument | Values |
|---|---|
| Match mode | 0 exact (the default), -1 exact or the next smaller value, 1 exact or the next larger value, 2 wildcards |
| Search mode | 1 top to bottom (the default), -1 bottom to top, 2 or -2 a fast search of data sorted in ascending or descending order |
Two things XLOOKUP does that VLOOKUP can't:
- Return several columns.
=XLOOKUP(F2, A2:A50, B2:C50)returns the product and the price side by side. The results spill into the cells to the right, so keep them empty, or you'll see#SPILL!. - Search from the bottom. With a search mode of
-1, XLOOKUP returns the last match, which is the latest entry in a log that grows downward.
Use VLOOKUP#
VLOOKUP searches the first column of a table and returns a value from a column you count from the left:
=VLOOKUP(F2, A2:C50, 3, FALSE)Here 3 means the third column of A2:C50, the price. Always end with FALSE. If you leave it out, VLOOKUP assumes the first column is sorted and returns the closest smaller match, which gives wrong answers on unsorted data without showing an error. HLOOKUP works the same way across rows instead of down columns.
Use INDEX with MATCH#
MATCH finds the position of a value, and INDEX returns the value at that position. Together they look up in any direction:
=INDEX(C2:C50, MATCH(F2, A2:A50, 0))The 0 asks MATCH for an exact match. XMATCH does the same job with XLOOKUP's match and search modes, as in =XMATCH(F2, A2:A50).
Wildcards#
To match part of a text, use * for any run of characters and ? for one character. XLOOKUP needs match mode 2, as in =XLOOKUP("Desk*", B2:B50, C2:C50, "Not found", 2). VLOOKUP with FALSE treats * and ? as wildcards on its own. Put ~ in front of either one to look for the character itself.
Fix lookup errors#
| Result | What went wrong | Fix |
|---|---|---|
#N/A | No match | Run Data → Data cleanup → Trim whitespace on both columns. Check that both hold numbers, or both hold text: 102 and "102" don't match. Add a not-found value to XLOOKUP. |
#REF! | VLOOKUP's column number is larger than the table | Count the columns again, or widen the table range. |
#VALUE! | XLOOKUP's ranges are different sizes, or VLOOKUP's column number is below 1 | Make the ranges the same height. |
#SPILL! | The result needs cells that aren't empty | Clear the cells to the right or below. |
| A wrong value | VLOOKUP without FALSE on unsorted data | Add FALSE, or switch to XLOOKUP. |
Lookups ignore capital letters, so fx-205 finds FX-205. For a list of every function with examples, choose Insert → Function, or see Use spreadsheet formulas and functions in Sheets. To stop typos in the values you look up, give the input cell a drop-down list with data validation.
Related#
Frequently asked questions
Is XLOOKUP case-sensitive in Sheets?
No. XLOOKUP, VLOOKUP and MATCH ignore capital letters, so acme finds ACME. They don't ignore spaces, so run Data → Data cleanup → Trim whitespace on columns that came from another system.
Should I use XLOOKUP or VLOOKUP?
Both work in Sheets. XLOOKUP is easier to get right. It matches exactly unless you ask otherwise, it can return a column to the left of the one you search, and inserting a column inside the table doesn't change which column it returns.
Can I look up values on another sheet?
Yes. Refer to the other sheet's ranges in the formula, as in =XLOOKUP(F2, 'Price list'!A2:A50, 'Price list'!C2:C50). Use quotes around a sheet name that has spaces.
How do I find the most recent entry for an item?
Give XLOOKUP a search mode of -1, as in =XLOOKUP(F2, A2:A500, D2:D500, "None", 0, -1). It searches from the bottom up and returns the last match.
Did this answer your question?
One click, no account needed.
Still need help?
Our support team can take it from here.