How to Subtract One Excel Row from Another Across Multiple Columns in WPS Office
Question details
The user needs to subtract the values in row 46 from the corresponding values in row 45 across columns D through O and return a single total difference.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- A worksheet contains numeric values in rows 45 and 46 across columns D through O, and the user needs the total difference between those rows.
- Observed behavior
- No calculated difference is currently present; the user needs a formula to compute row 45 minus row 46.
Open the worksheet in WPS Office Spreadsheets and confirm that rows 45 and 46 contain numeric values in columns D through O. Decide whether you want one total difference or individual column-by-column differences.
Use SUM to Return a Single Total Difference Between Two Rows
Use this when you need one cell that shows the total of row 45 minus row 46 across all columns D through O.
Click the cell where you want the result, for example D47, in your WPS Office spreadsheet.
Type =SUM(D45:O45)-SUM(D46:O46) into the selected cell.
Press Enter to calculate the total difference between row 45 and row 46.

Subtract Column by Column and Copy the Formula Across D through O
Use this when you want separate row differences for each column instead of one combined total.
Calculate Row Differences Easily in WPS Office Spreadsheets
Use the familiar SUM formula in WPS Office Spreadsheets to subtract one row from another across a range and get a total difference instantly. WPS Office opens, edits, and saves Excel workbooks without losing formula compatibility.
- 1. Open WPS Office Spreadsheets: Launch WPS Office and open the Excel workbook containing rows 45 and 46.
- 2. Select the destination cell: Click the cell where you want the total difference, such as D47.
- 3. Enter the formula: Type =SUM(D45:O45)-SUM(D46:O46) and press Enter.
- 4. Save the workbook: Click Menu > Save or press Ctrl+S to save your .xlsx file.

Frequently Asked Questions
Can I subtract row 46 from row 45 if some cells are blank or contain text?
Yes. The formula =SUM(D45:O45)-SUM(D46:O46) ignores blank cells and text within the summed ranges, but make sure there are no error values in the ranges.
How do I show differences for each column instead of one total?
Enter =D45-D46 in the first destination cell, such as D47, then drag the fill handle from D47 to O47 to copy the formula across columns.
Can I use this formula in both Microsoft Excel and WPS Office?
Yes. The formula uses standard Excel syntax and works in both Microsoft Excel and WPS Office Spreadsheets, including .xlsx files.
What should I do if my rows or columns are different?
Replace D45:O45 and D46:O46 with the actual ranges for your data. For example, if row 2 is subtracted from row 1 across A through Z, use =SUM(A1:Z1)-SUM(A2:Z2).




