Forum Discussion
Calculation error in spreadsheet
- JoeUser2004Nov 08, 2023Bronze Contributor
Phil_Couzens wrote: ``how do I rectify the rounding error to get``....
.... the same result when you explicitly round the numbers to 2 decimal places on the calculator.
Well, you explicitly round the calculated numbers to 2 decimal places in Excel.
The formula in C1 should be =ROUND((B1-A1)*24, 2)
And the formula in E1 should be =ROUND(C1*D1, 2)
Aside.... There is no "right" or "wrong" here. It is simply a question of the result that you want. There are many situations where we want a WYSIWYG result. Paper receipts and government forms, for example.
- Phil_CouzensNov 08, 2023Copper ContributorI did all that and got the right result.
However, when you enter a figure in d1 it shows a zero- JoeUser2004Nov 08, 2023Bronze Contributor
Phil_Couzens wrote: ``I did all that and got the right result. However, when you enter a figure in d1 it shows a zero``
Do you mean: with 22 in D1 initially (as you wrote originally), the two modified formulas in C1 and E1 display 2.67 and 58.74, as intended. But after that, when you enter a different number into D1, E1 displays zero?
I cannot know why that might happen because you do not provide sufficient information. Obviously, it has nothing to do with the modifications in C1 and E1, if they worked initially.
Attach an Excel file that demonstrates the __new__ problem: E1 displaying zero.