Formula Errors

Add or Subtract Half the Difference Between Two Values in Excel

Jason MillerJason Miller Dec 2, 2026 868 views

Question details

Adjust each tonnage value in column A by half the difference between the corresponding values in columns D and E.

Add or Subtract Half the Difference Between Two Values in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants a formula that adds half the difference when D is larger and subtracts it when E is larger.
Observed behavior
Each result should equal the value in column A plus half of the signed difference between columns D and E.
Before you start

Check that columns A, D, and E contain numeric values and identify the first row of data. Choose an empty result column so the formula does not overwrite the original tonnage.

Solution 1Recommended

Use a signed-difference formula in a separate column

Calculate the adjustment without an IF function and fill it down for the remaining rows.

1
Select a result cell

Click an empty cell in the first data row, such as F1 if your data starts in row 1.

2
Enter the formula

Type =A1+(D1-E1)/2 and press Enter. Change the row numbers if your data starts on a different row.

3
Fill down

Select the result cell and drag its fill handle down the column to apply the formula to the other rows.

Use a signed-difference formula in a separate column
How the sign works: When D is greater than E, the formula adds half the difference. When E is greater, it subtracts half the difference. If they are equal, the value in A is unchanged.
Calculate in WPS Spreadsheet

Adjust tonnage with a formula in WPS Spreadsheet

Open your spreadsheet in WPS Office and use the same signed-difference formula to calculate adjusted tonnage in a separate column.

  1. 1. Open your workbook: Launch WPS Office and open your spreadsheet in WPS Spreadsheet.
  2. 2. Select a result cell: Click an empty cell in the first data row, such as F1.
  3. 3. Enter the adjustment formula: Type =A1+(D1-E1)/2 and press Enter, changing the row numbers if needed.
  4. 4. Apply it to other rows: Drag the result cell's fill handle down the column, then save the workbook.
Calculate positive and negative adjustments with one formulaFill the formula down for multiple rowsOpen and save Microsoft Excel XLSX files
microsoft office alternative - wps office

Frequently Asked Questions

What happens when the values in D and E are equal?

D1-E1 is zero, so =A1+(D1-E1)/2 returns the original value in A1.

Can I enter the formula directly in A1?

No. Entering =A1+(D1-E1)/2 in A1 creates a circular reference because the formula refers to its own cell. Use a separate result column.

How do I use the formula if my data starts in row 2?

Enter =A2+(D2-E2)/2 in an empty cell on row 2, then drag the fill handle down.

Why does the formula return a value error?

Check the referenced cells in columns A, D, and E for text or other nonnumeric content. Replace invalid entries with numbers, then recalculate.