sum of digits in column not giving correct sum

M

Mary Beth

My column of numbers is not giving the correct total. My formula for the
total is: =ROUND(SUM(A4:A15),2) The numbers I added are 6.30+1.74+1.24 and
got an answer of 9.27 (should be 9.28). The numbers I am adding are
formulated from another macro not just a number I inserted (it is a formula
to calculate the gst out of a number from another column) and this is why I
think I am getting a wrong answer but I don't know how to correct it.
Help please!
 
M

Michael Arch

The problem you have is that the numbers have more than 2 decimals, so when
they are displayed they show an already "rounded" value, however, the round
formula picks all of the decimals and then the rounding occurs. So you could
display more than two decimals or ask the round to be 3 decimals and then
format the cell to show only two decimals.
 
G

Gary''s Student

You are getting the "wrong" answer because the values you are adding are not
the values you see in the cells. The values you see are truncated by
formatting.

If you expand the formats of the cells being added to display more decimal
digits, you will see the answer is correct.
 
R

Ron Rosenfeld

On Thu, 29 Jan 2009 08:47:01 -0800, Mary Beth <Mary
My column of numbers is not giving the correct total. My formula for the
total is: =ROUND(SUM(A4:A15),2) The numbers I added are 6.30+1.74+1.24 and
got an answer of 9.27 (should be 9.28). The numbers I am adding are
formulated from another macro not just a number I inserted (it is a formula
to calculate the gst out of a number from another column) and this is why I
think I am getting a wrong answer but I don't know how to correct it.
Help please!

IF you want your SUM to match the *displayed* value sum, then you need to round
before you SUM.

Try this **array** formula (confirmed with <ctrl><shift><enter>):

=sum(round(a4:a15),2))

--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top