# Calc sum function bug?

If I open a new Calc spreadsheet, and I paste in the following numbers in a column ( cells A1 to A6):
0,0086584
0,00159885
0,0016177
0,00164682
0,00151831
0,00155874
In cell A7 I get the correct result if I write the formula = A1 +A2 + A3 + A4 +A5+ A6 ( 0,01659882 )
But if I press the sum icon, and have A7 formula as =SOMMA(A1:A6) I get a wrong answer ( 0,0016177 )

Is this a bug, or am I not getting something here?

Cannot reproduce, unless cells A1, A2, A4, A5, and A6 are text (in which case it’s expected and normal).

(Explaining the comment by @mikekaganski to more detail:)

The only explanation not resorting to sorcery is that the somewhats contained in A1, A2, A4, A5, A6 and looking like numbers are actually texts, and that the only true number in the range is in A3.
SUM() simply ignores text content while addition using the operator “+” automatically converts the operands to numbers if applicable, and otherwise returns an error `#VALUE!`.

Try {=SUM(VALUE(A1:A6))} (entered for array-evaluation) to confirm. Also use `View > Value Highlighting Ctrl+F8` to check for my thesis.

A valuable way to always clearly distinguish text from numbers is to NOT set an explicit alignment for the respective cells. The default alignment aligns texts left and numbers right.

Down with silly automatisms! (There are a few clever ones, too.)

Sorry, your explanation is wrong. I have the same problem. I changed the currency format to number format, removed the currency symbol, removed the space where the currency symbol was, saved, copied to a new sheet, and had the exact same problem.

If you changed a cell’s ‘Numbers’ format to an “ordinary” one (no currency, no time …, “0.00” e.g. if your locale uses the decimal point), and the cell still displays a currency symbol, this is evidence for its containing text.
Did you already try the `View > Value Highlightging` (Ctrl+F8). Did you de-select any horizontal alignment? Did you ask the cell `=ISTEXT(myCellAddress)` entered into an empty cell?

Thanks, that was it.