Correct an Excel IF Formula for a Piecewise Percentage Calculation
Question details
Correct an Excel IF formula that calculates different values at or below 50% and above 50%.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A percentage in cell A6 determines which branch of a piecewise calculation is used.
- Observed behavior
- The formula produces unexpected values after the percentage exceeds 50%.
Check that A6 contains a numeric percentage: 50% is stored as 0.5 in Excel. Confirm that the intended result at exactly 50% is 30 and that negative results above 50% are expected.
Correct the IF formula's second calculation
Use this formula when values up to and including 50% should be multiplied by 60, and values above 50% should use 60 times the percentage minus 60.
In Excel, select the cell where you want the calculated result to appear.
Type =IF(A6<=0.5,60*A6,60*(A6-1)) in the formula bar and press Enter. Alternatively, use =IF(A6<=0.5,60*A6,60*A6-60).
Enter 50%, 51%, and 100% in A6 in turn. The formula should return 30, -29.4, and 0, respectively.

Use the same piecewise IF formula in WPS Spreadsheets
Open your workbook in WPS Spreadsheets and enter the corrected IF formula to calculate values on either side of the 50% threshold.
- 1. Open the workbook: Launch WPS Office, open Spreadsheets, and choose Open to select your Excel workbook.
- 2. Check the percentage: Select A6 and confirm it contains a numeric percentage, such as 50%.
- 3. Enter the formula: Select the result cell, type =IF(A6<=0.5,60*A6,60*(A6-1)) in the formula bar, and press Enter.
- 4. Test and save: Try 50% and 51% in A6 to check the results, then choose File > Save to save the workbook.

Frequently Asked Questions
What does the formula return at exactly 50%?
When A6 is 50%, the <=0.5 condition is true, so 60*A6 returns 30.
Why is the result negative just above 50%?
Above 50%, the formula uses 60*(A6-1). For example, 51% produces 60*(0.51-1), or -29.4. This is expected for the specified calculation.
What is the difference between subtracting 6 and subtracting 60?
In the second branch, 60*A6-60 is equivalent to 60*(A6-1). Using 60*A6-6 changes the result by 54 and does not match the intended formula.
What if Excel rejects the commas in the formula?
Some regional settings use semicolons as argument separators. Try =IF(A6<=0.5;60*A6;60*(A6-1)) and use your regional decimal separator if needed.




