Calculate the Difference Between the Highest and Lowest Values in a Row in WPS Spreadsheets
Question details
Automatically calculate the difference between the highest and lowest values in a row.

- Product
- Spreadsheet software, such as WPS Spreadsheets or Microsoft Excel
- Device & OS
- not provided
- Scenario
- A result cell should calculate the range of values in a row instead of containing a manually entered number.
- Observed behavior
- The result cell should update automatically when the values in the selected row change.
Identify the cells in the row that should be included, and choose a result cell outside that range. Check that the values are stored as numbers rather than text.
Subtract the Row Minimum from the Maximum
Use this formula to calculate the difference across a continuous range of cells.
Click an empty cell outside the range you want to calculate.
Type =MAX(B10:K10)-MIN(B10:K10) in the cell or formula bar. Replace B10:K10 with the row range you want to use.
Press Enter. The result updates when numeric values in the referenced range change.

Calculate the Difference for Specific Cells
Use separate cell references when only certain nonadjacent cells should be included.
Calculate Row Differences Automatically in WPS Spreadsheets
Use MAX and MIN in WPS Spreadsheets to calculate the difference between the highest and lowest values in a row and keep the result updated.
- 1. Open your spreadsheet: Open WPS Spreadsheets and select your workbook from Open.
- 2. Select a result cell: Click an empty cell outside the row range you want to compare.
- 3. Enter the formula: Type =MAX(B10:K10)-MIN(B10:K10), replacing the example range with your own.
- 4. Confirm the calculation: Press Enter to display the difference.

Frequently Asked Questions
Will the result update when I change a value?
Yes. The MAX and MIN formula recalculates when values in the referenced cells change, provided automatic calculation is enabled.
How do I include only certain cells in the row?
List the same selected references in both functions, for example, =MAX(B10,D10,K10)-MIN(B10,D10,K10).
Does the formula include only highlighted cells?
No. MAX and MIN use the cell references in the formula, not their highlight colors. List the highlighted cells explicitly if only those cells should be included.
Can I use the same formula in Microsoft Excel?
Yes. Enter the same MAX and MIN formula in an Excel result cell, replacing B10:K10 with your range.




