---
title: "XLOOKUP in Google Sheets: syntax and examples | PracticeExcel"
description: "Finds a value in one range and returns the matching item from another. Exact match by default, with an optional value for not found. With examples and exercises in Google Sheets."
canonical_url: "https://practiceexcelonline.com/sheets/functions/xlookup"
locale: en
meta:
  "og:description": "Finds a value in one range and returns the matching item from another. Exact match by default, with an optional value for not found. With examples and exercises in Google Sheets."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~WExPT0tVUCBpbiBHb29nbGUgU2hlZXRzOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~RmluZHMgYSB2YWx1ZSBpbiBvbmUgcmFuZ2UgYW5kIHJldHVybnMgdGhlIG1hdGNoaW5nIGl0ZW0gZnJvbSBhbm90aGVyLiBFeGFjdCBtYXRjaCBieSBkZWZhdWx0LCB3aXRoIGFuIG9wdGlvbmFsIHZhbHVlIGZvciBub3QgZm91bmQuIFdpdGggZXhhbXBsZXMgYW5kIGV4ZXJjaXNlcyBpbiBHb29nbGUgU2hlZXRzLg%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~WExPT0tVUChsb29rdXBfdmFsdWUsIGxvb2t1cF9hcnJheSwgcmV0dXJuX2FycmF5LCBbaWZfbm90X2ZvdW5kXSwgW21hdGNoX21vZGVdLCBbc2VhcmNoX21vZGVdKQ%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL3hsb29rdXAi%2Cs_EfhkIujCrlcBhXxT.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "XLOOKUP in Google Sheets: syntax and examples | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~WExPT0tVUCBpbiBHb29nbGUgU2hlZXRzOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~RmluZHMgYSB2YWx1ZSBpbiBvbmUgcmFuZ2UgYW5kIHJldHVybnMgdGhlIG1hdGNoaW5nIGl0ZW0gZnJvbSBhbm90aGVyLiBFeGFjdCBtYXRjaCBieSBkZWZhdWx0LCB3aXRoIGFuIG9wdGlvbmFsIHZhbHVlIGZvciBub3QgZm91bmQuIFdpdGggZXhhbXBsZXMgYW5kIGV4ZXJjaXNlcyBpbiBHb29nbGUgU2hlZXRzLg%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~WExPT0tVUChsb29rdXBfdmFsdWUsIGxvb2t1cF9hcnJheSwgcmV0dXJuX2FycmF5LCBbaWZfbm90X2ZvdW5kXSwgW21hdGNoX21vZGVdLCBbc2VhcmNoX21vZGVdKQ%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL3hsb29rdXAi%2Cs_EfhkIujCrlcBhXxT.png"
---

> Index of every page on this site: [llms.txt](https://practiceexcelonline.com/llms.txt)

# **XLOOKUP in Google Sheets**

Finds a value in one range and returns the matching item from another. Exact match by default, with an optional value for not found.

=

XLOOKUP(

## **In Google Sheets**

Google Sheets added XLOOKUP in 2022 with the same arguments in the same order, including the value for when nothing is found, match mode and search mode.

## **Syntax**

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

<dl><dt>**lookup_value **</dt>
<dd>The value to find.</dd>
<dt>**lookup_array **</dt>
<dd>The range to search.</dd>
<dt>**return_array **</dt>
<dd>The range to return from, the same size as lookup_array.</dd>
<dt>**if_not_found **(optional)</dt>
<dd>What to return when there is no match, instead of #N/A.</dd>
<dt>**match_mode **(optional)</dt>
<dd>0 exact (default), -1 exact or next smaller, 1 exact or next larger, 2 wildcards.</dd>
<dt>**search_mode **(optional)</dt>
<dd>1 first to last (default), -1 last to first.</dd></dl>

## **Examples**

D1`=XLOOKUP(<sup>1</sup>"Plum",<sup>2</sup>A2:A4,<sup>3</sup>B2:B4)`

|  | A | B | C | D |
| --- | --- | --- | --- | --- |
| 1 | Fruit | Price |  | **5** |
| 2 | Apple | 4 |  | |
| 3 | Pear | 6 |  | |
| 4 | Plum | 5 |  | |

**In plain words:** Find <sup>1</sup>Plum in <sup>2</sup>the fruit in A2:A4 and return <sup>3</sup>its price from B2:B4.

D1=XLOOKUP("Kiwi",A2:A4,B2:B4,"Not found")

|  | A | B | C | D |
| --- | --- | --- | --- | --- |
| 1 | Fruit | Price |  | **Not found** |
| 2 | Apple | 4 |  | |
| 3 | Pear | 6 |  | |
| 4 | Plum | 5 |  | |

## **Practice XLOOKUP**

- [**1****Look up a price with XLOOKUP**→](https://practiceexcelonline.com/sheets/practice/xlookup/xlookup)
- [**2****XLOOKUP with a not-found value**→](https://practiceexcelonline.com/sheets/practice/xlookup/xlookup-if-not-found)
- [**3****Find the latest match with XLOOKUP**→](https://practiceexcelonline.com/sheets/practice/xlookup/xlookup-last-match)
- [**4****The smallest box that fits with XLOOKUP**→](https://practiceexcelonline.com/sheets/practice/xlookup/xlookup-next-larger)

## **Related functions**

- [**VLOOKUP**](https://practiceexcelonline.com/sheets/functions/vlookup)
- [**INDEX**](https://practiceexcelonline.com/sheets/functions/index)
- [**MATCH**](https://practiceexcelonline.com/sheets/functions/match)
- [**XMATCH**](https://practiceexcelonline.com/functions/xmatch)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://practiceexcelonline.com/#identity","@type":"Organization","name":"PracticeExcel","url":"https://practiceexcelonline.com/","logo":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/#website","@type":"WebSite","inLanguage":"en-US","name":"PracticeExcel","url":"https://practiceexcelonline.com/","alternateName":["Practice Excel Online","PracticeExcelOnline.com"],"publisher":{"@id":"https://practiceexcelonline.com/#identity"},"workTranslation":{"@id":"https://excelopgaver.dk/#website"}},{"@id":"https://practiceexcelonline.com/sheets/functions/xlookup#webpage","@type":"WebPage","description":"Finds a value in one range and returns the matching item from another. Exact match by default, with an optional value for not found. With examples and exercises in Google Sheets.","name":"XLOOKUP in Google Sheets: syntax and examples","url":"https://practiceexcelonline.com/sheets/functions/xlookup","breadcrumb":{"@id":"https://practiceexcelonline.com/sheets/functions/xlookup#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/sheets/functions/xlookup"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/sheets/functions/xlookup#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Google Sheets practice exercises","item":"https://practiceexcelonline.com/sheets","position":2},{"@type":"ListItem","name":"XLOOKUP in Google Sheets: syntax and examples","position":3}]},{"@id":"https://practiceexcelonline.com/sheets/functions/xlookup#article","description":"Finds a value in one range and returns the matching item from another. Exact match by default, with an optional value for not found. With examples and exercises in Google Sheets.","headline":"XLOOKUP in Google Sheets: syntax and examples","inLanguage":"en-US","thumbnailUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~WExPT0tVUCBpbiBHb29nbGUgU2hlZXRzOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~RmluZHMgYSB2YWx1ZSBpbiBvbmUgcmFuZ2UgYW5kIHJldHVybnMgdGhlIG1hdGNoaW5nIGl0ZW0gZnJvbSBhbm90aGVyLiBFeGFjdCBtYXRjaCBieSBkZWZhdWx0LCB3aXRoIGFuIG9wdGlvbmFsIHZhbHVlIGZvciBub3QgZm91bmQuIFdpdGggZXhhbXBsZXMgYW5kIGV4ZXJjaXNlcyBpbiBHb29nbGUgU2hlZXRzLg%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~WExPT0tVUChsb29rdXBfdmFsdWUsIGxvb2t1cF9hcnJheSwgcmV0dXJuX2FycmF5LCBbaWZfbm90X2ZvdW5kXSwgW21hdGNoX21vZGVdLCBbc2VhcmNoX21vZGVdKQ%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL3hsb29rdXAi%2Cs_EfhkIujCrlcBhXxT.png","@type":["Article","TechArticle"],"author":{"@id":"https://practiceexcelonline.com/#identity"},"image":{"@id":"https://practiceexcelonline.com/#/schema/image/1"},"isPartOf":{"@id":"https://practiceexcelonline.com/sheets/functions/xlookup#webpage"},"mainEntityOfPage":{"@id":"https://practiceexcelonline.com/sheets/functions/xlookup#webpage"},"publisher":{"@id":"https://practiceexcelonline.com/#identity"}},{"@id":"https://practiceexcelonline.com/#logo","@type":"ImageObject","caption":"PracticeExcel","contentUrl":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png"},{"@id":"https://practiceexcelonline.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~WExPT0tVUCBpbiBHb29nbGUgU2hlZXRzOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~RmluZHMgYSB2YWx1ZSBpbiBvbmUgcmFuZ2UgYW5kIHJldHVybnMgdGhlIG1hdGNoaW5nIGl0ZW0gZnJvbSBhbm90aGVyLiBFeGFjdCBtYXRjaCBieSBkZWZhdWx0LCB3aXRoIGFuIG9wdGlvbmFsIHZhbHVlIGZvciBub3QgZm91bmQuIFdpdGggZXhhbXBsZXMgYW5kIGV4ZXJjaXNlcyBpbiBHb29nbGUgU2hlZXRzLg%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~WExPT0tVUChsb29rdXBfdmFsdWUsIGxvb2t1cF9hcnJheSwgcmV0dXJuX2FycmF5LCBbaWZfbm90X2ZvdW5kXSwgW21hdGNoX21vZGVdLCBbc2VhcmNoX21vZGVdKQ%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL3hsb29rdXAi%2Cs_EfhkIujCrlcBhXxT.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~WExPT0tVUCBpbiBHb29nbGUgU2hlZXRzOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~RmluZHMgYSB2YWx1ZSBpbiBvbmUgcmFuZ2UgYW5kIHJldHVybnMgdGhlIG1hdGNoaW5nIGl0ZW0gZnJvbSBhbm90aGVyLiBFeGFjdCBtYXRjaCBieSBkZWZhdWx0LCB3aXRoIGFuIG9wdGlvbmFsIHZhbHVlIGZvciBub3QgZm91bmQuIFdpdGggZXhhbXBsZXMgYW5kIGV4ZXJjaXNlcyBpbiBHb29nbGUgU2hlZXRzLg%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~WExPT0tVUChsb29rdXBfdmFsdWUsIGxvb2t1cF9hcnJheSwgcmV0dXJuX2FycmF5LCBbaWZfbm90X2ZvdW5kXSwgW21hdGNoX21vZGVdLCBbc2VhcmNoX21vZGVdKQ%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL3hsb29rdXAi%2Cs_EfhkIujCrlcBhXxT.png"}]}
```

## Sitemap

See the full [sitemap](https://practiceexcelonline.com/sitemap.md) for all pages.
