VLOOKUP Function (OpenOffice Calc)
Learn the VLOOKUP function in Apache OpenOffice Calc: Vertical search and reference to indicated cells.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: Documented by Apache OpenOffice 4.1.16; original introduction not established.
- Availability: Supported in Apache OpenOffice 4.1.16, 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.
VLOOKUP searches the first column of a table and returns a value from the matching row. Its return index is relative to the table, starting at 1. A whole-sheet column coordinate is not the same as this relative index. The function supports exact and sorted approximate modes, whose requirements differ.
Syntax and arguments
=VLOOKUP(lookup_value; table; column_index; mode)
=VLOOKUP(lookup_value; table; column_index)
The first three arguments are required. Use mode 0 or FALSE for exact matching. Mode 1, TRUE or omission selects sorted approximate matching. The checked implementation floors the return index before validating it against the table’s column dimension. Use integer indices intentionally; index 1 returns from the lookup column itself. Examples use English function names and semicolon separators.
Worked example
For a product lookup, enter the following into cells F1:G3:
| F (Product) | G (Price) |
|---|---|
| Apple | 5 |
| Pear | 8 |
| Plum | 4 |
=VLOOKUP("Pear";F1:G3;2;0)
Expected result: 8.
Why it works: Look up a price using an exact match in the first column. The specified sample table supplies the referenced cells.
Example evidence
This original example retains its historical comparable LibreOffice 25.2 checking scope; it was not an OpenOffice native test. The reference controls below are independently checked source/documentation expectations, not new application captures.
Additional reference controls
| Formula | Reference result |
|---|---|
=VLOOKUP("Apple";F1:G3;2;0) |
5 |
=VLOOKUP("Pear";F1:G3;2;0) |
8 |
=VLOOKUP("Plum";F1:G3;2;0) |
4 |
=VLOOKUP("pear";F1:G3;2;0) |
8 |
=VLOOKUP("Pear";F1:G3;1;0) |
"Pear" |
=VLOOKUP("Peach";F1:G3;2;0) |
#N/A |
=VLOOKUP("Pear";F1:G3;3;0) |
ERROR |
Quoted results are text. ERROR means the source’s error path without claiming a newly observed localized error message. Range formulas here use ordinary scalar entry unless the array form is explicitly discussed.
Practical worksheet
The original grid places Apple/Pear/Plum in F1:F3 and 5/8/4 in G1:G3; the first data row is row 1, not an extra header row. Enter query labels Pear,Apple,Plum in I2:I4. In J2 enter =VLOOKUP(I2;$F$1:$G$3;2;0) and fill down. Expected values are 8,5,4. The fixed table reference stays in place while the query row changes.
For these literal text controls, use whole-cell matching with formula regular expressions disabled. Matching is case-insensitive in the documented lookup behavior, so lowercase pear also finds Pear. A duplicate exact key returns the first match in the search direction. Do not use that rule as an implicit aggregation of all duplicate records.
Advanced applications and distinctions
Use sorted thresholds. Put 0,10,20,50 in A8:A11 and 1,2,3,4 in B8:B11. =VLOOKUP(25;A8:B11;2;1) returns 3, using threshold 20. Queries 0,9,10,49,50,100 return 1,1,2,3,4,4. A query of -1 is below the first threshold and gives #N/A. Omitting mode uses the same approximate behavior for this sorted numeric table.
Keep the search edge explicit. Only the table’s first column is searched. The returned value must be in a permitted column within that same table; VLOOKUP does not search every cell or automatically look outside the supplied region. A return index of 2.9 uses effective index 2 in the pinned source, but an explicit integer is clearer.
Distinguish pattern matching from literal identity. With formula regular expressions enabled, a lookup such as P.ar can match Pear in a cell range. Disabling whole-cell matching can also allow partial text matches. These are application options, not an Excel wildcard syntax promise. The source matrix-string branch has a regex TODO, so the range examples do not certify equivalent regex behavior for literal arrays.
Errors and troubleshooting
No exact match gives #N/A. Return indices below 1 or beyond the table’s column count follow an illegal-argument path. An index of 0 is not a request for a whole record. The implementation rejects a multi-sheet table reference in this lookup path. Other exact native error displays were not captured.
Approximate mode requires ascending lookup values, and its result is the applicable lower threshold rather than the mathematically nearest number. Unsorted input can silently select an unsuitable record; always supply mode 0 for ordinary unsorted identifier lookups. Sorted-mode duplicate matches are not guaranteed to select the first duplicate.
Text that looks numeric may differ from a real numeric key. Check leading spaces, data types, whole-cell and regex options before changing the query. Empty return cells, errors in source cells, mixed-type sorting, locale collation and export behavior have not been comprehensively tested here. Do not hide every lookup error with zero when zero would be a legitimate returned value.
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.
Related functions
Documentation and verification
The official VLOOKUP function reference was retrieved October 15, 2026. The pinned 4.1.16 interpreter and function descriptions retain their October 13 source retrieval dates. These support scalar branch selection, reference dimensions, lookup modes and the limitations stated here. Original introduction and last functioning version remain unestablished, separate from documented release support. No new native, GUI, array-entry or import/export test was performed.