Forum Discussion
elhudbox
Mar 14, 2022Copper Contributor
Excel shows an incorrect answer
Excel is showing an incorrect answer. I have a simple formula: =IF(N15=N44,"ok","oops") Accordingly, if the number in cell N15 is the same as the number in cell N44, the answer should be "ok." Ho...
- Mar 14, 2022
Perhaps it is a rounding error. What is the result if you change the formula to
=IF(ROUND(N15-N44,4)=0,"ok","oops")
HansVogelaar
Mar 14, 2022MVP
Perhaps it is a rounding error. What is the result if you change the formula to
=IF(ROUND(N15-N44,4)=0,"ok","oops")
- elhudboxMar 14, 2022Copper ContributorInteresting! I have no idea why it would be a rounding error because (1) the red (which I think indicates a problem) shows up in the formula without regard to the numbers entered in the cells, and (2) the numbers to match have two decimals (e.g. 5,610.13) which are not rounded from other numbers.
However, changing the formula as you suggested fixed the problem!!
So, I still have no idea why this problem occurred (it clearly should not have), but I will go with the fix! Hopefully, it will continue to work as further columns that use the same formula are populated with data.
Thanks!- elhudboxMar 14, 2022Copper ContributorOH, WAIT!!! That wasn't the answer. If I changed the numbers to the right of the decimal, I still got an "ok" answer even if it should have said "oops."
For example, 5,610.14 in cell N15 with 5,610.13 in cell N44 should have said "oops" (because they are different numbers), but they still said "ok." That's wrong.
Back to the drawing board.