Function Problems

Use an IF Formula in WPS Spreadsheets to Calculate Half of a Profit

Olivia MillerOlivia Miller Nov 18, 2026 869 views

Question details

Calculate half of a positive amount and return zero when the amount is negative.

Calculate Half of a Profit and Return Zero for Losses in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
A worksheet contains profit or loss amounts, and the user wants a formula for the profit share.
Observed behavior
The desired result is half the source amount when it is positive and zero when it is negative or zero.
Before you start

Identify the cell containing the numeric profit or loss amount. The examples below use C2 as the source and D2 as the result; change the references if your worksheet uses different cells.

Solution 1Recommended

Use an IF formula to calculate half of positive amounts

Use IF when you want the formula to explicitly test whether the amount is positive.

1
Select the result cell

Click D2, or another empty cell where you want the result to appear.

2
Enter the IF formula

Type =IF(C2>0,C2/2,0) in D2 and press Enter. A positive value in C2 is divided by two; a negative value or zero returns zero.

3
Fill the formula down

Select D2 and drag the fill handle down the column to apply the formula to the other rows.

Use an IF formula to calculate half of positive amounts
Calculate profit shares

Calculate positive profit shares in WPS Spreadsheets

Use an IF or MAX formula in WPS Spreadsheets to calculate half of each positive amount while returning zero for losses.

  1. 1. Open your worksheet: Open WPS Spreadsheets and select the workbook containing your profit and loss amounts.
  2. 2. Select an empty cell: Click D2 if the first amount is in C2, or select an empty cell beside your first amount.
  3. 3. Enter the formula: Type =IF(C2>0,C2/2,0) and press Enter, adjusting C2 to match your source cell if needed.
  4. 4. Calculate the remaining rows: Drag the result cell's fill handle down to copy the formula to the remaining rows.
Calculate half of positive profit amounts with a simple formulaFill the formula down for multiple rowsOpen and edit Microsoft Excel XLS and XLSX filesUse familiar spreadsheet cells and formula tools
microsoft office alternative - wps office

Frequently Asked Questions

What happens if the amount is zero?

The formula =IF(C2>0,C2/2,0) returns zero because zero is not greater than zero.

Can I use the same formulas in Microsoft Excel?

Yes. Excel supports both =IF(C2>0,C2/2,0) and =MAX(C2/2,0). Enter either formula in an empty result cell and press Enter.

How do I apply the formula to an entire column of amounts?

Enter the formula in the first result cell, such as D2, then drag its fill handle down. The relative reference changes from C2 to C3, C4, and so on.

What if my amount is in a different cell?

Replace C2 in the formula with the cell containing your amount. For example, use =IF(B2>0,B2/2,0) when the source is B2.