A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Rounding Effecting Sum



 
 
Thread Tools Display Modes
  #1  
Old November 20th, 2009, 03:40 PM posted to microsoft.public.excel.misc
Steve Graves
external usenet poster
 
Posts: 1
Default Rounding Effecting Sum

I have cells that cotain formulas based on adding four other cells together.
One of those cells is the result of a percentage applied to a dollar amount.
While it only displays 2 decimal places when looking at it, the formula seems
to recognize that there are more. This is interfering with the total in one
of my columns. The dollar amounts don't add up correctly because the sum is
adding decimal places I am not seeing.

So. How do we shave off those places so the formula doesn't see them?
  #2  
Old November 20th, 2009, 03:46 PM posted to microsoft.public.excel.misc
Bob I
external usenet poster
 
Posts: 10,698
Default Rounding Effecting Sum

See "Set rounding precision" in Excel Help.

Steve Graves wrote:

I have cells that cotain formulas based on adding four other cells together.
One of those cells is the result of a percentage applied to a dollar amount.
While it only displays 2 decimal places when looking at it, the formula seems
to recognize that there are more. This is interfering with the total in one
of my columns. The dollar amounts don't add up correctly because the sum is
adding decimal places I am not seeing.

So. How do we shave off those places so the formula doesn't see them?


  #3  
Old November 20th, 2009, 04:03 PM posted to microsoft.public.excel.misc
Joe User[_2_]
external usenet poster
 
Posts: 757
Default Rounding Effecting Sum

"Steve Graves" Steve wrote:
While it only displays 2 decimal places when looking at it, the formula
seems to recognize that there are more.


Correct. Formatting normally only affects what is displayed, not the
underlying actual value.


How do we shave off those places so the formula doesn't see them?


I believe the best way is to use ROUND prolifically. For example, in the
cell involving a percentage calculation:

=ROUND(A1*B1, 2)

But even if you round the computation in every cell, it would be prudent to
round their sum:

=ROUND(A2+B2+C2+D2, 2)

This avoids another source of unexpected results due the way that Excel (and
most applications) store numbers and perform arithmetic, called binary
floating point. For example:

=IF(10.1 - 10 = 0.1, TRUE)

results in FALSE(!). This can be corrected using:

=IF(ROUND(10.1 - 10, 1) = 0.1, TRUE)


PS: An alternative to using ROUND everywhere is to use the calculation
option "Precision as displayed". I do not recommend it for a number of
reasons. If you want to experiment with PAD, be sure to copy your Excel
file first. PAD can make unintended changes that are irreversible.


----- original message -----

"Steve Graves" Steve
wrote in message
...
I have cells that cotain formulas based on adding four other cells
together.
One of those cells is the result of a percentage applied to a dollar
amount.
While it only displays 2 decimal places when looking at it, the formula
seems
to recognize that there are more. This is interfering with the total in
one
of my columns. The dollar amounts don't add up correctly because the sum
is
adding decimal places I am not seeing.

So. How do we shave off those places so the formula doesn't see them?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.