"SUM" Function doesn't work

Discuss the spreadsheet application

"SUM" Function doesn't work

Postby cschneider7 » Wed Sep 24, 2008 12:05 pm

Hi Folks

I have a row with numbers, i.e.

120.00 
182.65 
224.50 

I put them in a row an add the SUM fonction, it works,
BUT:
If I put them in a grater space i.e.

120.00

182.65

224.50

they don't work anymore,
why??

Thanks for an answer
OOo 2.3.X on Ms Windows XP
cschneider7
 
Posts: 1
Joined: Wed Sep 24, 2008 11:50 am

Re: "SUM" Function doesn't work

Postby Hagar Delest » Wed Sep 24, 2008 1:02 pm

Can you upload such file (see: How to attach a document here)?
AOO 4.1.1 on Windows 7 and Xubuntu 14.10 (Utopic Unicorn)
User avatar
Hagar Delest
Moderator
 
Posts: 26412
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: "SUM" Function doesn't work

Postby Dave » Wed Sep 24, 2008 1:30 pm

"they don't work anymore"

What DO they do?

David.
Dave
 
Posts: 1011
Joined: Sun Dec 23, 2007 6:53 pm

Re: "SUM" Function doesn't work

Postby acknak » Wed Sep 24, 2008 3:39 pm

More information would be nice, but my guess is that you added the space after you configured the SUM, and now the SUM function does not refer to the correct cells.

Double-click the cell containing the SUM, and Calc will highlight the cells it references. You can adjust it by dragging or expanding the colored outline.
AOO/LO 4 • Linux • Fedora 21
User avatar
acknak
Moderator
 
Posts: 20502
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: "SUM" Function doesn't work

Postby Villeroy » Wed Sep 24, 2008 3:58 pm

I put 3 numbera in A1:A3, select A1:A3 and push the sum-button at the formula bar. This puts formula =SUM(A1:A3) into A4. Now I can insert cells (or entire rows) in A1:A3 and see how the formula adjusts to =SUM(A1:A4), =SUM(A1:A5),...

I can also clutter some numbers in some range, select the used range and push the sum-button at the formula bar. This appends SUM formulas below the selected range, one for every selected column. =SUM(A1:A4) =SUM(B1:B4), =SUM(C1:C4). Again, I can insert and delete rows in A1:C4 and all formulas adjust properly.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 12.04, OpenOffice 4.x & LibreOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 20450
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: "SUM" Function doesn't work

Postby keme » Wed Sep 24, 2008 5:22 pm

I can see one situation where things will not work as expected: When pushing the Sum button without having a range selected, expecting Calc to automatically select the correct range.

In this case, Calc will not read your mind (even though it seems like it does sometimes). Instead it will select a contiguous range of numbers from the active cell, upwards or to the left. So if there's no empty cells in the range, Calc will do what's needed. If there are empty cells, Calc will stop at the first empty space.

If a wrong range is selected, you can manually select the correct range before accepting the formula.
Apache OO 3.4.1/4.1.1, on Ms Windows 7/8 and Mac OS-X.
User avatar
keme
Volunteer
 
Posts: 1842
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: "SUM" Function doesn't work

Postby thaitang » Tue Nov 04, 2008 9:51 am

hi,

i also have a problem with the SUM function using OO 3.0 on ubuntu 8.10.

i am very used to clicking on the SUM function while in the cell i want the SUM result in. i then highlight the cells i want the SUM function to include and hit enter. now this is when i would usually expect all of the numbers in the cells highlighted to be SUMMED (something like "=SUM(D4:I4)" ). well now in 3.0 i get a result of 0 (zero) no matter what i do. i change this to be the formula i really want "=SUM((D4*E4)+(F4*G4)+(H4*I4))" and the result still ends up being 0 (zero).

of course the cells D4-thru-I4 all have numbers greater than 0 ... :P~~~

any ideas here?

cheers,
tt
OOo 3.0.X on Ubuntu 8.x + winXP
thaitang
 
Posts: 2
Joined: Tue Nov 04, 2008 9:39 am

Re: "SUM" Function doesn't work

Postby keme » Tue Nov 04, 2008 12:09 pm

You don't really need the SUM() function here. Just enter =(D4*E4)+(F4*G4)+(H4*I4).
The sum function is for making a sum from one or more ranges. For single cells or ranges it's not needed, and it sometimes doesn't work as expected. With a different layout of your cells you might use the SUMPRODUCT() function for your calculation.
Apache OO 3.4.1/4.1.1, on Ms Windows 7/8 and Mac OS-X.
User avatar
keme
Volunteer
 
Posts: 1842
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: "SUM" Function doesn't work

Postby thaitang » Thu Nov 06, 2008 6:52 pm

You don't really need the SUM() function here. Just enter =(D4*E4)+(F4*G4)+(H4*I4).

this is how i would normally enter basic calcs like this. i just used SUM() func for this calc after =(D4*E4)+(F4*G4)+(H4*I4) would result in a zero. so either way i end up with a result of zero when all of these cells have >0 values.

i just tried it again to verify and yes i still end up with a result of zero using =(D4*E4)+(F4*G4)+(H4*I4).

thanks
tt
OOo 3.0.X on Ubuntu 8.x + winXP
thaitang
 
Posts: 2
Joined: Tue Nov 04, 2008 9:39 am

Re: "SUM" Function doesn't work

Postby TheGurkha » Thu Nov 06, 2008 7:06 pm

This is what I get. Do you see any differences in your formula than the one displayed here?

2008-11-06_170353.jpg
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
User avatar
TheGurkha
Volunteer
 
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: "SUM" Function doesn't work

Postby keme » Thu Nov 06, 2008 7:15 pm

Then I guess your numbers are entered as text, or autocalculate is off. In numerical calculations, text cells give the number zero.

Select menu item View - Value highlighting. Number constants will show in blue, text constants black, and formula results green. (At least that's how it is in my setup.)

If autocalculate is off, you can press function key F9 to manually initiate a recalculation. The menu item for AutoCalculate is in Tools - Cell contents.
Apache OO 3.4.1/4.1.1, on Ms Windows 7/8 and Mac OS-X.
User avatar
keme
Volunteer
 
Posts: 1842
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway


Return to Calc

Who is online

Users browsing this forum: Yahoo [Bot] and 31 guests