WPS Spreadsheet IF Formula to Select Between Two Cell Values
Question details
The user needs a formula that selects the applicable value from two cost cells.
- Product
- WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- A per-person cost and a bulk cost are stored in separate cells, and only one contains the applicable nonzero value.
- Observed behavior
- The desired result is to return the applicable cost automatically, using either the larger value or a defined priority rule.
Confirm which cells contain the two possible values and whether an unused cell is blank, zero, or potentially negative. Decide whether the larger value or a specific priority rule should control the result.
Use MAX to return the nonzero value from two cost cells
Use this option when one cell is blank or zero and the applicable cost is always the larger of the two values.
The MAX function compares both cells and returns the larger number. If one cell is blank or zero, it returns the populated cost automatically.
In WPS Spreadsheet, click the cell where you want the selected cost to appear.
Type =MAX(C2,E2) in the formula bar or directly into the selected cell, replacing C2 and E2 with your two cost-cell references.
Press Enter to calculate the result. WPS Spreadsheet will return the larger value from the two referenced cells.
Use IF to apply a specific priority between the two values
Use this option when negative values are possible or when one cell must be selected whenever it is nonzero, regardless of which value is larger.
Select the Applicable Cost with MAX or IF in WPS Spreadsheet
WPS Spreadsheet provides familiar formula tools for comparing two cost cells or applying a precise selection rule. Enter MAX for a simple larger-value result, or IF when the formula must prioritize a specific cell.
- 1. Open WPS Spreadsheet: Launch WPS Office and open an existing workbook or choose Spreadsheet to create a new file.
- 2. Identify the source cells: Locate the two cells containing the possible costs, such as C2 for the per-person cost and E2 for the bulk cost.
- 3. Enter the selection formula: Click the result cell and enter =MAX(C2,E2), or use =IF(E2<>0,E2,C2) when a specific priority rule is required.
- 4. Confirm the result: Press Enter and check that the output changes correctly when either source value is updated.

Frequently Asked Questions
What formula returns the larger value from two cells in WPS Spreadsheet?
Enter =MAX(C2,E2) in the result cell, replacing C2 and E2 with the references to your two values. The formula returns the larger number.
How do I choose E2 only when it is nonzero?
Use =IF(E2<>0,E2,C2). WPS Spreadsheet returns E2 when it is not zero and returns C2 when E2 equals zero.
Can I use IF when the unused cell is blank?
Yes. Use =IF(E2<>"",E2,C2) to return E2 when it contains a value and C2 when E2 is blank.
Why is MAX not suitable for negative values?
MAX returns the numerically larger value, so it may select a negative value based on size rather than business priority. Use IF to explicitly choose the intended cell.
Will these formulas work in Excel files opened in WPS Spreadsheet?
Yes. MAX and IF are standard spreadsheet functions and generally work in WPS Spreadsheet with XLSX files.




