# Lookup formulas in Excel and Google Sheets

> Find a value and bring back what goes with it: by ID, by two keys, the last match, the closest match. 6 answers, each checked by running it.

Source: https://spreadsheetpractice.com/formulas/topic/lookup · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on October 29, 2026

## Answers

- [How to use VLOOKUP to find an exact match in Excel](https://spreadsheetpractice.com/formulas/vlookup-exact-match): Use =VLOOKUP(lookup_value, table, column_number, FALSE). The FALSE at the end makes it look for an exact match. `=VLOOKUP(G1,A2:D9,3,FALSE)`
- [How to look up a value to the left in Excel](https://spreadsheetpractice.com/formulas/lookup-value-to-the-left): Use XLOOKUP, which can return any column: =XLOOKUP(value, lookup_column, result_column). In older versions use INDEX and MATCH. `=XLOOKUP(G1,D2:D7,A2:A7)`
- [How to look up a value with two criteria in Excel](https://spreadsheetpractice.com/formulas/lookup-with-two-criteria): Multiply two tests to build the lookup array: =XLOOKUP(1,(range1=crit1)*(range2=crit2),result_range). `=XLOOKUP(1,(A2:A8=G1)*(B2:B8=G2),D2:D8)`
- [How to find the last occurrence of a value in Excel](https://spreadsheetpractice.com/formulas/find-last-match): Use XLOOKUP with search mode -1 to search from the bottom up: =XLOOKUP(value, lookup_range, return_range,,0,-1). `=XLOOKUP(F1,B2:B8,A2:A8,,0,-1)`
- [How to look up a value between two numbers in Excel](https://spreadsheetpractice.com/formulas/lookup-value-between-two-numbers): Put the lower bound of each band in a sorted column and use an approximate match: =XLOOKUP(value, lower_bounds, results,,-1). `=XLOOKUP(E1,A2:A6,B2:B6,,-1)`
- [How to return a message instead of #N/A in a lookup](https://spreadsheetpractice.com/formulas/lookup-return-text-if-not-found): Give XLOOKUP its if_not_found argument, =XLOOKUP(value, lookup, return, "Not found"), or wrap an older lookup in IFNA. `=XLOOKUP(G1,A2:A9,C2:C9,"Not found")`

More topics: [Counting formulas](https://spreadsheetpractice.com/formulas/topic/count) · [Sum formulas](https://spreadsheetpractice.com/formulas/topic/sum) · [IF and logic formulas](https://spreadsheetpractice.com/formulas/topic/logic) · [Text formulas](https://spreadsheetpractice.com/formulas/topic/text) · [Date formulas](https://spreadsheetpractice.com/formulas/topic/date) · [Dynamic array formulas](https://spreadsheetpractice.com/formulas/topic/dynamic) · [Duplicates and data cleanup formulas](https://spreadsheetpractice.com/formulas/topic/cleanup) · [Rounding and math formulas](https://spreadsheetpractice.com/formulas/topic/math) · [Percentage formulas](https://spreadsheetpractice.com/formulas/topic/percent)

Every answer: [Formula answers](https://spreadsheetpractice.com/formulas). Formulas used: `VLOOKUP`, `XLOOKUP`

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
