Function Problems

How to Build a Delivery Cost Formula from Multiple Conditions in WPS Spreadsheets

Elise WilliamsElise Williams Nov 13, 2026 868 views

Question details

The user needs to build a spreadsheet delivery cost calculator that applies different rates based on delivery type, people, zone, and pallets.

How to Build a Delivery Cost Formula from Multiple Conditions in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
The user wants a formula that returns the correct delivery charge from multiple pricing conditions and can update when inputs change.
Observed behavior
The expected result is a formula that retrieves each applicable rate from a pricing table and totals the correct delivery cost.
Before you start

Gather the complete delivery pricing rules: delivery types, zones, included people, extra-person hourly charges, pallet limits, and zone pallet prices. Open WPS Spreadsheets and set up one Rates sheet for the pricing table and one Delivery Calculator sheet for the formula inputs.

Solution 1Recommended

Create a Rate Table and Retrieve Charges with XLOOKUP

Use this when each delivery type and zone combination has one rate row and you need to pull base, extra-people, and pallet charges into a calculator.

A structured rate table keeps pricing rules visible and easy to update. In WPS Spreadsheets, XLOOKUP can match multiple criteria by multiplying Boolean arrays and return the matching rate for exact lookups.

1
Create the delivery rate table

Open WPS Spreadsheets and rename Sheet1 to Rates. Enter columns: Delivery Type, Zone, Included People, Extra Person Hourly Rate, Pallet Limit, Zone Price per Pallet, and Base Charge. Fill one row for every valid delivery type and zone combination.

2
Set up the calculator sheet

Rename Sheet2 to Delivery Calculator. Add input cells for Delivery Type, Zone, People, and Pallets, then label output cells for Base Charge, Extra People Charge, Pallet Charge, and Total Delivery Cost.

3
Retrieve the base charge with XLOOKUP

In the Base Charge cell, enter =XLOOKUP(1,(B2=Rates!$A$2:$A$100)*(B3=Rates!$B$2:$B$100),Rates!$G$2:$G$100,"Check rates") and press Enter. Adjust the cell references to match your calculator inputs and rate table.

4
Calculate extra people and pallet charges

For Extra People Charge, use =MAX(0,B4-XLOOKUP(1,(B2=Rates!$A$2:$A$100)*(B3=Rates!$B$2:$B$100),Rates!$C$2:$C$100,0))*XLOOKUP(1,(B2=Rates!$A$2:$A$100)*(B3=Rates!$B$2:$B$100),Rates!$D$2:$D$100,0). For Pallet Charge, multiply the pallet input by the matched zone price per pallet.

5
Return the total delivery cost

In the Total Delivery Cost cell, enter =SUM(BaseCharge,ExtraPeopleCharge,PalletCharge) or reference the individual output cells. Test with known delivery scenarios to confirm the formula returns the expected amount.

Create a Rate Table and Retrieve Charges with XLOOKUP
Formula returns the correct combination: When all delivery type and zone combinations exist in the rate table, WPS Spreadsheets retrieves each charge and totals the delivery cost automatically.

Build a Multi-Condition Delivery Cost Calculator in WPS Spreadsheets

WPS Spreadsheets can directly implement this delivery cost model. Use a rate table with XLOOKUP or SUMIFS to retrieve delivery type, zone, people, and pallet charges, then total them in a calculator sheet.

  1. 1. Install and open WPS Office: Download and install WPS Office, then open WPS Spreadsheets and create a new workbook or open your existing .xlsx delivery pricing file.
  2. 2. Build the rate table: Create a Rates sheet with columns for delivery type, zone, included people, extra-person hourly rate, pallet limit, zone price per pallet, and base charge.
  3. 3. Enter lookup formulas: Use XLOOKUP or SUMIFS from the Formulas tab to match the calculator inputs to the rate table, then add cells for base, extra people, and pallet charges.
  4. 4. Total and test the delivery cost: Sum the charge cells in a Total Delivery Cost field, then test several delivery type, zone, people, and pallet combinations against your expected results.
Reuse your existing Excel rate table and delivery pricing rules without rebuilding themUse XLOOKUP, SUMIFS, and familiar Excel formulas in WPS SpreadsheetsKeep the calculator lightweight and easy to edit for changing zones or pallet ratesOpen, edit, and save .xlsx files with full Microsoft Excel format compatibility
microsoft office alternative - wps office

Frequently Asked Questions

Does WPS Spreadsheets support XLOOKUP for multiple delivery conditions?

Yes. In WPS Spreadsheets, click the cell where you need the rate, go to Formulas > Lookup & Reference > XLOOKUP, or type =XLOOKUP(...). Use multiple conditions by multiplying Boolean arrays, such as (DeliveryTypeRange=Type)*(ZoneRange=Zone).

What is the best way to organize delivery rates for zones, pallets, and people?

Put each pricing dimension in its own column in a Rates sheet and create one row per valid delivery type and zone combination. Include columns for included people, extra-person hourly rate, pallet limit, and zone price per pallet so each charge can be retrieved separately.

Why does my delivery cost formula return #N/A?

The combination is probably missing from the rate table or the lookup ranges do not match. Wrap the XLOOKUP with IFERROR, for example =IFERROR(XLOOKUP(...),"Missing rate"), and verify the Delivery Type and Zone values match exactly, including spaces and capitalization.

Should I use XLOOKUP or SUMIFS for a delivery cost model?

Use XLOOKUP when you need to retrieve one rate for a unique delivery type and zone. Use SUMIFS when multiple rows can match the same delivery and you need to total charges, such as base delivery, per-pallet zone fees, and add-on services.