Contact

LOOKUP Function (LibreOffice Calc)

Lookup Intermediate LibreOffice Calc

Learn the LOOKUP function in LibreOffice Calc: Determines a value in a vector by comparison to values in another vector.

Verification status: Two identified examples were executed in LibreOffice Calc 25.2. Other examples are not necessarily application-tested. How formula examples are checked

Availability and version history

  • Introduced: Documented by LibreOffice 26.8.1.1; original introduction not established.
  • Availability: Supported in LibreOffice 26.8.1.1, verified against its function registry. This identifies a supported release, not a final working version.
  • Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
  • Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.

The LOOKUP function in LibreOffice Calc is used for this task: Determines a value in a vector by comparison to values in another vector. Find a matching ordered value and return the corresponding amount.

This guide explains how to read the formula, reproduce a concrete example, interpret its result and recognize common input mistakes.

Tested visual example: Assign a discount tier

What this example answers: Find a tier from an ascending schedule of threshold values. The formula was entered and recalculated in LibreOffice Calc 25.2.3.2, not simulated or inferred from a reference page.

Sample sheet you can reproduce

Create a sheet named Example, put these headings on row 4, and enter the sample values in rows 5–10. Or download the editable LOOKUP practice workbook with the formulas already entered.

Sheet row A: Minimum spend B: Tier label C: Discount % D: Details
5 0 None 0% Base tier
6 100 Bronze 2% Entry
7 250 Silver 5% Popular
8 500 Gold 8% Preferred
9 750 Platinum 10% High volume
10 1000 Elite 12% Top

Example 1 — Formula and expected result

Select cell E5, enter the formula and press Enter:

=LOOKUP(650;A5:A10;B5:B10)

Verified result: Gold.

LOOKUP uses the largest threshold not exceeding the search value; 650 is in the 500 Gold band.

Critical prerequisite: A5:A10 is sorted numerically from smallest to largest. LOOKUP is not an unsorted exact-match substitute for XLOOKUP.

Actual LibreOffice Calc 25.2 window showing LOOKUP formula in the formula bar, example input rows and the calculated result in cell E5

Genuine screenshot from LibreOffice Calc 25.2.3.2: the formula bar, input table and computed output are visible. No interface imagery was generated.

Example 2 — Change the inputs

The same downloadable .ods file has this second formula in E12:

=LOOKUP(300;A5:A10;B5:B10)

Verified result: Silver. Find the band for a 300 purchase. It falls within the threshold beginning at 250, so the result is Silver.

How to avoid misleading results

  • Watch for this mistake: The lookup thresholds MUST be sorted ascending. Unsorted data can produce incorrect results without an obvious error.
  • Scope and limitations: For exact SKU matches on unsorted lists, use XLOOKUP or MATCH with match type 0.
  • Argument separators: These examples use semicolons (;) in the LibreOffice Calc locale tested. Other locales may use different settings.
  • Verification scope: The two formulas in this section were executed and checked in LibreOffice Calc 25.2.3.2. Older examples elsewhere in this article have not all been independently retested.

Official function reference: LibreOffice Help — LOOKUP.

Syntax and arguments

LOOKUP(search_criterion; search_vector; [result_vector])
Argument Required? Meaning
Search criterion Yes The value to be used for comparison.
Search vector Yes The vector (row or column) in which to search.
Result vector Optional The vector (row or range) from which the value is to be determined.

Calc formulas normally use semicolons (;) between arguments in common configurations; the displayed separator may depend on settings or locale.

Worked example

Use this small practice sheet for the ranges referenced in the formula:

Row A (Quantity) B (Amount) C (Category)
1 1 10 apple
2 2 20 pear
3 3 30 apple
4 4 40 pear
5 5 50 apple
=LOOKUP(3;A1:A5;B1:B5)

Expected result: 30.

Why it works: Find a matching ordered value and return the corresponding amount. The specified sample table supplies the referenced cells.

How to use it in your own spreadsheet

  1. Identify the cells or inputs that correspond to the sample values above.
  2. Enter the formula in an empty cell, changing the references or literal values to match your sheet.
  3. Compare the output with a manual check on a small known example.
  4. Extend the formula to a larger dataset only after you understand the result.

Common problems and practical checks

  • Use the correct lookup column or return range, and use exact-match options where appropriate.
  • Check for duplicate keys, leading spaces and numbers stored as text in lookup data.
  • A pasted formula may produce an error when it uses the other program’s argument separator or unsupported options.

Lookup tip: Use exact matching for product codes or identifiers unless you have deliberately sorted your data for approximate matching. Check the behavior when no match exists.

Documentation and verification

  • LibreOffice Calc Help
  • The standalone example was calculated using LibreOffice Calc 25.2.3.2 on October 9, 2026 and its computed result matched the expected value. This does not certify every option, version, or other example.