decimal places within a formula

P

Paul01

Is there a way to set up a number within an equation to have onlyt
decimal places? The cells are already formatted to have this, but th
data within the cells contains more decimal places which is what i
used when the sum() function is run. Since the anwser to this functio
is used in comparison with other numbers, the answer needs to come ou
to 2 decimal places in order to match up
 
M

MrShorty

There's an option in the main options dialog to use "precision a
displayed" which would cause it to only use the two decimal place
displayed
 
R

Ron Rosenfeld

Is there a way to set up a number within an equation to have onlyt 2
decimal places? The cells are already formatted to have this, but the
data within the cells contains more decimal places which is what is
used when the sum() function is run. Since the anwser to this function
is used in comparison with other numbers, the answer needs to come out
to 2 decimal places in order to match up.

*array-enter*

=SUM(ROUND(A1:A10,2))

To *array-enter*, hold down <ctrl><shift> while hitting <enter>. Excel will
place braces {...} around the formula.


--ron
 
R

Ron Rosenfeld

= int (sum(X:X)*100) / 100


You may be correct in deciphering what the OP wants.

But I would point out that your procedure will give different results from
adding up the entries rounded first to two decimal places.


--ron
 
Top