View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default SUM function working improperly

On Jan 3, 5:58*pm, streaker6
wrote:
I have a function that is =SUM(A32:A113) in cell K194,
simple right? Well not so much, it should be totalling up 67
and is showing 48, if I try to change the formula, the formula
is what shows in cell K194.


What does that mean: "If I try to change the formula [what formula:
the one in K194?], the formula is what shows in cell K194"? Well,
duh! I am sure you mean something very different and useful; but what
you wrote is meaningless to me. Can you clarify? Perhaps give an
example.


what's going wrong?


I suspect that some/many/most of the cells in A32:A113 are actually
text, not numeric. In that case, SUM considers their value to be
zero. For example, if you have the formula =if(something,"1","2") in
a cell in column A, it might look like 1 or 2, but it is actually
text. Or you might have entered numbers into cells that were
formatted as Text.

Select the cell with the formula (K194?), and in the Formula Box of
the Formula Bar (fx), highlight the range A32:A113 and press F9.
Verify that they are all the numbers that you expect and no text.
Caveat: Press Esc afterwards to undo the effect of F9. If you
inadvertently press Enter, you will have changed the formula. Of
course, you can simply undo the change by pressing ctrl+z.

If that does not work, try a divide-and-conquer approach to isolating
the source of the problem. For example, change the range to A32:A72
(about half) and see if the sum is correct. If so, try the range
A73:A113; if should be wrong. Whichever is wrong, try dividing the
range in half again, and check the sum of each half.

Whatever you do, get out of the mindset that the "SUM function [is]
working improperly". SUM works just fine. Find your mistake.