Function Problems

WPS Spreadsheet: Return a Price for a Selected Item

Adam DavisAdam Davis Nov 12, 2026 869 views

Question details

The user needs a spreadsheet formula that returns the correct price when an item or wood section is selected.

Product
WPS Spreadsheet
Device & OS
not provided
Scenario
A product or wood section is selected in one cell, and its matching price must be retrieved from a two-column reference table.
Observed behavior
The desired price should update automatically whenever the selected item changes.
Before you start

Prepare a reference table with a unique item column and a corresponding price column, then confirm the selected item cell and the result cell. Use clear table headers such as WoodSection and Price.

Solution 1Recommended

Use XLOOKUP to return the matching price

Use this method when your WPS Spreadsheet version supports XLOOKUP and your reference data is organized in separate lookup and return columns.

XLOOKUP searches the selected item in the reference column and returns the corresponding value from the price column. The empty-text argument keeps the result blank when no match is found.

1
Create the pricing table

In WPS Spreadsheet, enter the item names in one column and their prices in the next column. Select the range, choose Insert > Table, and name the table WoodPricing if table names are available.

2
Select the item cell

Enter or choose the wood section in cell D1, or use the cell that contains the selected product.

3
Enter the lookup formula

Select cell E1 and enter =XLOOKUP(D1,WoodPricing[WoodSection],WoodPricing[Price],"") if the table uses the WoodSection and Price column names.

4
Test another selection

Change the value in D1 and confirm that E1 automatically displays the matching price.

Automatic updates: The returned price recalculates whenever the selected item in D1 changes.
WPS Spreadsheet

Automatically Look Up Prices in WPS Spreadsheet

WPS Spreadsheet lets you build a reference table and use XLOOKUP, VLOOKUP, or INDEX and MATCH to return a price automatically when a selected item changes.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open a new or existing spreadsheet.
  2. 2. Build the reference table: Enter item names and prices in adjacent columns, then select the range and choose Insert > Table.
  3. 3. Enter the selected item: Place the product or wood section selection in a dedicated cell such as D1.
  4. 4. Add the lookup formula: In the result cell, use =XLOOKUP(D1,WoodPricing[WoodSection],WoodPricing[Price],"") or a compatible VLOOKUP formula.
  5. 5. Test the result: Change the selection and confirm that the returned price updates automatically.
Automatically updates prices when the selected product changesSupports XLOOKUP, VLOOKUP, and INDEX and MATCH lookup workflowsWorks with XLSX files and Microsoft Excel lookup formulasProvides a familiar spreadsheet interface for product pricing tables
microsoft office alternative - wps office

Frequently Asked Questions

Which formula should I use to return a price from a selected item?

Use =XLOOKUP(D1,WoodPricing[WoodSection],WoodPricing[Price],"") when XLOOKUP is supported. Otherwise, use =VLOOKUP(D1,WoodPricing,2,FALSE) for a two-column table.

Why does VLOOKUP return an incorrect price?

Check that the selected item is in the first column of the lookup range and that the last argument is FALSE for an exact match. Also check for extra spaces or spelling differences.

How can I keep the result blank when no item is selected?

Use XLOOKUP with an empty fallback value, such as =XLOOKUP(D1,WoodPricing[WoodSection],WoodPricing[Price],""). For VLOOKUP, wrap the formula in IFERROR, such as =IFERROR(VLOOKUP(D1,A2:B20,2,FALSE),"").

Will the price update when I change the selected item?

Yes. If the lookup formula refers to the selection cell, such as D1, WPS Spreadsheet recalculates the result automatically whenever D1 changes.