首頁
» 微軟OFFICE
»
LibreOffice Calc VLOOKUP vs XLOOKUP: A Beginner-Friendly Functions Guide
LibreOffice Calc VLOOKUP vs XLOOKUP: A Beginner-Friendly Functions Guide
LibreOffice Calc gives you more than one way to find a value in a table and return related data. For years, VLOOKUP was the familiar choice. Today, Calc also includes XLOOKUP, a newer lookup function that removes several VLOOKUP limitations and is usually easier to maintain.
This guide starts with the basic mental model, then walks through practical formulas you can copy into a small spreadsheet. It also explains where INDEX/MATCH still fits, what can go wrong, and which function makes sense for a new workbook.
What should you know before using lookup functions?
A lookup searches one range for a key, such as a product ID, then returns a related value, such as the product price. The search key might be text, a number, a date, or a cell reference.
In current LibreOffice Help, XLOOKUP is documented as a modern replacement for VLOOKUP, HLOOKUP, and LOOKUP. XLOOKUP has been available since LibreOffice 24.8. The current LibreOffice 26.8 Help documents exact and approximate matching, wildcard and regular-expression matching, reverse search, and binary search. See the official LibreOffice XLOOKUP documentation.
One detail that often surprises people coming from Microsoft Excel: LibreOffice formula examples commonly use semicolons between arguments. For example, =XLOOKUP(F2;A2:A6;D2:D6). Calc may adapt separators to your locale, so follow the separator that your installation accepts.
VLOOKUP vs XLOOKUP at a glance
Capability
VLOOKUP
XLOOKUP
Exact match
Yes, but you normally specify 0/FALSE
Yes; exact match is the default
Return a value to the left of the search column
No, not directly
Yes
Separate search and return ranges
No; uses one table array plus a column index
Yes
Built-in result when no match is found
No dedicated argument
Yes
Search from last item to first
No direct search-mode argument
Yes
Approximate match
Yes
Yes, with explicit match modes
Available in LibreOffice before 24.8
Yes
No
Prepare a small practice table
Create columns A through D with the headers Product ID, Product Name, Category, and Price. Add a few IDs such as P001 through P005. Put the ID you want to search for in F2 and place your formula in G2.
Formulas in Calc begin with an equals sign. You can type them directly into a cell or into the Formula Bar; the official LibreOffice formula-entry guide describes both methods.
Step 1: Use VLOOKUP for a basic exact match
Suppose P004 is in F2 and you want the price from column D. Enter: