Fix an Excel IF Formula Failing Because of Rounding Differences in WPS Spreadsheets
Question details
The user needs to fix an Excel IF formula that compares two currency calculations and returns the wrong result because hidden floating-point rounding differences remain after display formatting.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- Two currency calculations display the same amount, such as £10,000, but contain slightly different decimal values internally. The user is comparing them with an exact IF formula.
- Observed behavior
- The IF formula returns "Not Balanced" or another wrong result near the threshold even though the visible currency amounts appear identical.
Open the workbook in WPS Spreadsheets, select the formula cell, and confirm that both compared cells contain currency values with two decimal places rather than text or numbers rounded only by formatting.
Round both currency values to two decimals inside the IF formula
Use this when two cells display the same currency amount but an exact IF comparison returns the wrong result because of hidden floating-point differences.
Excel-compatible spreadsheets store numbers as binary floating-point values, so currency calculations can produce tiny remainders such as 0.0000000001. Rounding both sides to two decimal places makes the formula compare the same values that are shown to the user.
Click the cell that contains the current IF formula, for example =IF(G37=G47,"Balanced","Not Balanced").
In the formula bar, replace the comparison with =IF(ROUND(G37,2)=ROUND(G47,2),"Balanced","Not Balanced").
Press Enter to apply the corrected formula, then check the result at the £10,000 threshold or other boundary values.

Compare the rounded difference to zero
Use this alternative when you prefer a shorter formula that checks whether the difference between two amounts is zero to two decimal places.
Fix Excel IF rounding errors in WPS Spreadsheets with ROUND
Open the workbook in WPS Spreadsheets and add ROUND to the IF comparison so currency checks match the displayed two-decimal values, avoiding floating-point rounding errors near thresholds like £10,000.
- 1. Open the workbook: Open WPS Office and load the .xlsx file that contains the failing IF formula.
- 2. Select the formula cell: Click the cell comparing G37 and G47.
- 3. Edit the formula: In the formula bar, enter =IF(ROUND(G37,2)=ROUND(G47,2),"Balanced","Not Balanced").
- 4. Apply and save: Press Enter to apply the corrected formula, then save the workbook.
- 5. Verify boundary values: Test with amounts around £10,000, such as 10000.001, to confirm the formula returns the expected result.

Frequently Asked Questions
Why does Excel say two identical currency cells are not equal?
The cells may only look identical because formatting displays two decimal places. The underlying values can contain small floating-point differences, so an exact comparison such as G37=G47 returns FALSE. Wrap the references in ROUND to compare the displayed currency precision.
Which formula should I use to compare two currency cells to two decimal places?
Use =IF(ROUND(G37,2)=ROUND(G47,2),"Balanced","Not Balanced"). This rounds both values to two decimals before the IF comparison.
Can I fix the rounding issue without editing the IF formula?
Yes. You can wrap the source calculations in ROUND, such as =ROUND(your_calculation,2), but editing the comparison formula is usually the most localized fix.
Does this ROUND fix work in both WPS Spreadsheets and Microsoft Excel?
Yes. WPS Spreadsheets supports the same IF and ROUND function syntax, so the formula works when you open an Excel workbook in WPS Office and save it back as .xlsx.
What does =IF(ROUND(G37-G47,2)=0,"Balanced","Not Balanced") do?
It subtracts one currency value from the other, rounds the difference to two decimal places, and checks whether the result is zero. If the rounded difference is zero, the IF formula returns "Balanced".




