Contact

XLOOKUP Function in WPS Spreadsheet: Formula, Examples & Troubleshooting

Lookup Intermediate WPS Spreadsheet

Learn the XLOOKUP formula in WPS Spreadsheet: return the aligned value for a searched key, with reproducible examples, expected answers and compatibility cautions.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: XLOOKUP searches a one-row or one-column key range and returns aligned data. The official WPS lesson documents forward, reverse, binary and wildcard modes, including a historical array-entry procedure. Explicit modes make the controls below easier to reproduce.

Availability and version history

  • Introduced: documented by July 29, 2021 in the official WPS lesson; original release and minimum build are not established.
  • Availability: the lesson is scoped to WPS Office for Windows Personal and asks users to update to the then-current version.
  • Scope: that dated update advice is not a numeric minimum or a promise of current support in every WPS client.
  • Checked: October 14, 2026. Full walkthrough and embedded argument/mode tables reviewed; examples independently modeled, not native-tested.

Syntax and arguments

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

The lesson demonstrates three-argument lookups and optional additional controls. Its argument table requires the lookup array to be a single row or column and names #VALUE! for an invalid two-dimensional lookup array. The return range supplies aligned values and can have multiple result columns or rows.

The fourth argument supplies a value when a valid match is absent. The fifth controls matching, and the sixth controls search direction or algorithm. The reviewed lesson does not explicitly label both numerical defaults, so new examples state match_mode 0 and search_mode 1 instead of importing a defaults table from Excel.

Use English function names and comma separators, adjusting separators for the workbook locale. The expected values are independent positional models, not captured WPS results.

Original input fixture

Enter the original data in A1:F9. Amount and Units are numeric; other columns contain text. Keep output cells outside this range.

Row A · Item B · Team C · Status D · Amount E · Units F · Agent
1 Item Team Status Amount Units Agent
2 Pen East Paid 120 12 Ana
3 Pad West Pending 75 5 Bo
4 Box East Paid 210 7 Ana
5 Tape North Paid 90 0 Cy
6 Folder West Paid 150 3 Bo
7 Pen East Pending 60 8 Dee
8 Pad West Paid 125 12 Ana
9 Box North Pending 80 4 Cy

Example 1: original duplicate-key control

=XLOOKUP("Pad",A2:A9,D2:D9,"Missing")

Expected result: 75. The first Pad matches row 3, so aligned Amount returns 75.

This retained result is the original first-to-last exact-match model. The source’s omitted-mode demonstrations use ordinary lookup examples rather than a complete default/duplicate test matrix. To make that policy explicit, use:

=XLOOKUP("Pad",A2:A9,D2:D9,"Missing",0,1)

Its independent expectation is also 75, with the documented forward-search mode written in the formula.

Example 2: original missing-key control

=XLOOKUP("Stapler",A2:A9,D2:D9,"Missing")

Expected result: Missing. No item is named Stapler, so the supplied missing label is returned.

For the same explicit matching policy, append 0,1 as the last two arguments. The missing label addresses an absent match. It is not a universal wrapper for malformed ranges, invalid arguments or errors already present in a matched source cell.

Example 3: search direction changes the selected duplicate

=XLOOKUP("Pad",A2:A9,D2:D9,"Missing",0,-1)

Expected result: 125, from the final Pad at worksheet row 8. The official search-mode table defines -1 as last-to-first, and the walkthrough explicitly uses it for the latest matching record.

The two Pad amounts sum to 200. Neither individual lookup computes that total. Use a separately documented SUMIF calculation when all matching records belong in the result.

Advanced example: return data to the left

=XLOOKUP(90,D2:D9,A2:A9,"Missing",0,1)

Expected result: Tape. Amount 90 occurs once in the original fixture. The return column A is left of lookup column D; the WPS lesson explicitly demonstrates this reverse-column arrangement.

This is different from last-to-first searching. Returning a column to the left concerns the layout of the ranges; search_mode -1 concerns which matching record is visited first.

Advanced example: return two aligned fields

=XLOOKUP("Tape",A2:A9,D2:E9,"Missing",0,1)

Expected output is one row containing 90, 0, the Amount and Units for Tape. The zero is a real source value, not a missing result.

For its multi-column and multi-key examples, the 2021 Windows lesson selects the entire destination area and confirms with Ctrl+Shift+Enter. Follow that documented historical array-entry workflow for this scope: select two adjacent result cells before entering the formula. This does not certify modern spill behavior or the same shortcut in other WPS clients.

Advanced example: a horizontal lookup

Create a separate fixture with J1:L1 containing A, B, C and J2:L2 containing 4, 9, 2:

=XLOOKUP("B",J1:L1,J2:L2,"Missing",0,1)

Expected result: 9. The key array is one row, and the returned quantity uses the same column position. Selecting a two-row key rectangle would violate the documented one-dimensional key requirement.

Match modes and a bounded approximate control

The official embedded table describes:

match_mode Documented purpose
0 Exact match; absent matches normally produce #N/A without a supplied replacement
1 Exact match, otherwise a larger item
-1 Exact match, otherwise a smaller item
2 Wildcard matching

For a small independent fixture, put numeric keys 20, 40 in J5:J6 and labels Lower, Upper in K5:K6:

=XLOOKUP(25,J5:J6,K5:K6,"Missing",-1,1)
=XLOOKUP(25,J5:J6,K5:K6,"Missing",1,1)
=XLOOKUP(25,J5:J6,K5:K6,"Missing",0,1)

Expected results are Lower, Upper and Missing. This fixture has exactly one eligible smaller and one eligible larger key, avoiding an unverified multi-candidate tie or boundary rule. The source’s informal “minimum” phrasing should not be read as a request for the smallest key in an arbitrary entire table.

Binary searching, wildcards and remaining limits

The search-mode table specifies 1 for forward linear search, -1 for reverse linear search, 2 for binary search on ascending keys and -2 for binary search on descending keys. Keep keys and aligned results sorted together. An unsorted binary-search input violates that documented precondition; this guide does not certify its native result or error.

The lesson demonstrates an asterisk in wildcard mode 2. Exact mode and wildcard mode should not be substituted merely because their outputs happen to agree for one key. Full wildcard escaping, case sensitivity, blank-key conversion, mismatched return shapes and every source-error outcome remain unverified here.

Microsoft Excel | Google Sheets | LibreOffice Calc | Gnumeric | PlanMaker 2026

Evidence level: Complete manuscript and product-specific walkthrough reviewed, including the visually checked argument, matching and search tables. Original title, publication date, two formulas and complete input table are retained. Numerical defaults and untested boundaries are not inferred from another spreadsheet product; all new outputs are independently modeled.