Share via

Excel Formula Error

Anonymous
2024-09-13T14:30:11+00:00

I have a formula involving 6 cells. The formula is addition and subtraction only. All of the numbers in the formula are dollar / cents amounts, so only zeroes past the second decimal place. The formula result, however, has a "6" in the 14th decimal place. This seems to come out of nowhere. Any ideas as to why? This is disrupting another formula later on in the sheet. Thanks!

Also, this is a worksheet representing one month of the year. All of the other worksheets, representing the other months, do not seem to have this issue, and when creating this workbook, I copied / pasted and modified.

Formula is (6744.89-13,879.79)+(5.00-5.00)+7,935.33-815.00

13,879.79000000000000000000000000000000000
6,744.89000000000000000000000000000000000
7,935.33000000000000000000000000000000000
815.00000000000000000000000000000000000
5.00000000000000000000000000000000000
5.00000000000000000000000000000000000
(14.57000000000060000000000000000000000)
Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

riny 20,870 Reputation points Volunteer Moderator
2024-09-13T14:36:33+00:00

Google for "floating point arithmetic" and you can learn all about it. If you really want to dig into it.

Whenever you note something like this, use the ROUND function to limit the outcome to (presumably) 2 digits.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2024-09-13T14:36:14+00:00

Dear respected

Good day! Thank you for posting to Microsoft Community. We are happy to help you.

As per your description, Excel uses binary floating-point representation for its numbers, which can cause precision errors in calculations. When you perform arithmetic operations, small rounding errors may occur, especially when the numbers involved are large or complex.

Use the ROUND Function to avoids issues with floating-point precision. =ROUND((6744.89-13879.79)+(5.00-5.00)+7935.33-815.00, 2)

You can replace your formula with:

=ROUND((6744.89 - 13879.79) + (5.00 - 5.00) + 7935.33 - 815.00, 2)

Please understand that our initial reply may not always immediately resolve the issue. However, with your help and more detailed information, we can work together to find a solution.

I'm sorry and I apologize for that.

Appreciate your patience and understanding and thank you for your time and cooperation.

Sincerely,

Waqas Muhammad

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2024-09-13T14:34:24+00:00

Such tiny rounding errors are due to the way Excel stores and processes floating point numbers. Since all values are dollar/cent amounts, you should round the result to 2 decimal places:

=ROUND((6744.89-13,879.79)+(5.00-5.00)+7,935.33-815.00, 2)

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful