Use an IF Formula in WPS Spreadsheets to Calculate Half of a Profit
Question details
Calculate half of a positive amount and return zero when the amount is negative.

- 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.
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.
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.
Click D2, or another empty cell where you want the result to appear.
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.
Select D2 and drag the fill handle down the column to apply the formula to the other rows.

Use MAX to exclude negative amounts
Use this shorter formula to get the same result for numeric amounts.
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. Open your worksheet: Open WPS Spreadsheets and select the workbook containing your profit and loss amounts.
- 2. Select an empty cell: Click D2 if the first amount is in C2, or select an empty cell beside your first amount.
- 3. Enter the formula: Type =IF(C2>0,C2/2,0) and press Enter, adjusting C2 to match your source cell if needed.
- 4. Calculate the remaining rows: Drag the result cell's fill handle down to copy the formula to the remaining rows.

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.




