# How to find the first value greater than a number in Excel

Look for the first TRUE in a comparison: `=XLOOKUP(TRUE,B2:B11>E1,A2:A11)` returns the date of the first day above the target.

**Excel:** `=XLOOKUP(TRUE,B2:B11>E1,A2:A11)` (Excel 2021, 2024 and Microsoft 365)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E |
| --- | --- | --- | --- | --- |
| Date | Units sold |  | Target | 250 |
| 2026-06-01 | 182 |  | First day above target |  |
| 2026-06-02 | 205 |  |  |  |
| 2026-06-03 | 199 |  |  |  |
| 2026-06-04 | 238 |  |  |  |
| 2026-06-05 | 250 |  |  |  |
| 2026-06-06 | 271 |  |  |  |
| 2026-06-07 | 264 |  |  |  |
| 2026-06-08 | 302 |  |  |  |
| 2026-06-09 | 245 |  |  |  |
| 2026-06-10 | 318 |  |  |  |

Formula in E2: `=XLOOKUP(TRUE,B2:B11>E1,A2:A11)`

Result: 6/6/2026

## How it works

`B2:B11>E1` gives TRUE for every day above 250. XLOOKUP returns the date next to the first TRUE, June 6. June 5 sold exactly 250, which isn't greater than the target, so it doesn't count.

## Other ways

- `=INDEX(A2:A11,MATCH(TRUE,INDEX(B2:B11>E1,0),0))`: Every Excel version, without Ctrl+Shift+Enter.
- `=INDEX(FILTER(A2:A11,B2:B11>E1),1)`: Filter the days above target and take the first. Excel 2021, Microsoft 365 and Google Sheets.

## Common mistakes

- Decide between `>` and `>=`. With `>=` the answer here is June 5.
- XLOOKUP(E1,B2:B11,A2:A11,,1) is not the same thing: it finds the smallest value above the target anywhere in the list, not the first one in date order.

## Questions

**How do I return the value instead of the date?**

Return the units column: `=XLOOKUP(TRUE,B2:B11>E1,B2:B11)`.

**How do I find the last day above the target?**

Search from the bottom: `=XLOOKUP(TRUE,B2:B11>E1,A2:A11,,0,-1)`.

**How do I find the first value below a number?**

Flip the comparison: `B2:B11<E1`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/first-value-greater-than-a-number
