Contact

LOOKUP Function in WPS Spreadsheet: Syntax, Examples and Compatibility

Lookup Intermediate WPS Spreadsheet

Use LOOKUP in WPS Spreadsheet to find an approximate match in a sorted key column and return a corresponding category. Two original examples, expected results, cautions and official software documentation.

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

Quick answer: LOOKUP searches ascending keys and returns the result aligned with the largest key no greater than the requested value. Its vector and array forms have different layouts. A smaller-than-minimum request has the documented #N/A result.

Availability and version history

  • Introduced: documented by 2019-05-07 in the official WPS lesson; original introduction is not established.
  • Availability: The lesson is scoped to WPS Office for Windows Personal. Its walkthrough explicitly demonstrates WPS Office 2019 PC; that is supported-in evidence, not an introduction claim.
  • Scope: exact current supported builds and equivalent behavior in other WPS clients remain unverified.
  • Checked: October 14, 2026. Complete function-specific references and independent reference/array models; no native WPS test was performed.

Syntax and arguments

=LOOKUP(lookup_value, lookup_vector, result_vector)
=LOOKUP(lookup_value, array)

The dated WPS definition supplies all three arguments in vector form: a lookup value, a one-row or one-column key vector and a same-sized result vector. The separate two-argument array form searches the first row or first column according to shape, then returns from the last row or column. This guide does not certify an omitted-result-vector shortcut. Keys must be ascending; the source says text comparison ignores case, but these controls use numeric keys.

Use English function names and comma separators, adapting separators for the workbook locale. Expected results are independent models of the stated WPS rules, not native application observations.

Set up the original controls

Enter the original sorted table in A2:B5:

Row A: threshold B: grade
2 0 Low
3 50 Medium
4 80 High
5 95 Elite

Example 1: original control

=LOOKUP(72,A2:A5,B2:B5)

Expected output: Medium.

72 lies between the sorted thresholds 50 and 80, so the category associated with 50 is returned.

Example 2: original comparison

=LOOKUP(98,A2:A5,B2:B5)

Expected output: Elite.

The highest threshold not exceeding 98 is 95.

Example 3: check both sides of the category boundaries

For the original table, the expected results are:

Request Category
-1 #N/A
0 Low
49 Low
50 Medium
79 Medium
80 High
94 High
95 Elite
110 Elite

The lower threshold belongs to its category. A request above the largest threshold still selects that last category; it does not prove that 110 is a valid score for the surrounding application.

Advanced example: closest by distance is a different question

Request 79 returns Medium, because 50 is the largest threshold no greater than 79. Threshold 80 is closer by distance, but it exceeds the request.

The official walkthrough uses informal “closest” language for a nonexact lookup. The formal definition specifies the lower-bound rule, which the examples here follow. Do not reinterpret the tutorial as nearest-neighbor matching in either direction.

When an exact identifier is required, use an explicitly exact MATCH rule or another separately documented exact lookup rather than relying on LOOKUP’s approximate answer.

Advanced example: a cost-band table with aligned results

For a separate fixture in D2:E5, enter lower quantities 0, 10, 25 and 50, paired with labels Single, Small, Medium and Bulk. For requests 8, 10, 30 and 75, vector LOOKUP returns Single, Small, Medium and Bulk.

The 30-unit request selects position three. If the result labels are independently reordered to Bulk, Medium, Small, Single while keys remain fixed, the same request returns Small, which is a valid string attached to the wrong threshold.

Always move complete key/result records when sorting. LOOKUP cannot recover a lost association from the labels’ spelling.

Advanced example: array shape selects the search direction

Create a three-row, two-column range G2:H4 with keys 0, 20, 40 in G and labels Start, Middle, Upper in H:

=LOOKUP(35,G2:H4)

Expected result: Middle. The array is taller than it is wide, so LOOKUP searches its first column and returns from its last column.

Now create a two-row, three-column range J2:L3 with the same keys across J2:L2 and the same labels across J3:L3:

=LOOKUP(35,J2:L3)

Expected result: Middle again. This array is wider than it is tall, so the search uses its first row and the result comes from its last row. A square array uses the first-column rule according to the source.

Data quality and scope

The original article’s “last key” wording could imply a duplicate-key selection rule. The dedicated WPS source establishes the largest eligible value but does not resolve every duplicate tie. The controls use unique thresholds, and duplicate-result selection remains unverified.

Unsorted keys may return plausible wrong answers. Mixed numeric/text ordering, formula errors, blank keys and mismatched-dimension error labels need additional product-specific evidence or native testing. Do not silently replace those checks with a generic error fallback.

Evidence level: Full article and complete product-specific formal definition and walkthrough reviewed. Original title, publication date, two worked formulas and input fixtures are preserved. Additional reference, selection and array controls are independently modeled; no native application, performance or file-interchange test is claimed.