[Solved] "SUM" Function doesn't work

Discuss the spreadsheet application
Post Reply
cschneider7
Posts: 1
Joined: Wed Sep 24, 2008 11:50 am

[Solved] "SUM" Function doesn't work

Post by cschneider7 »

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
Last edited by Hagar Delest on Sat Dec 08, 2018 1:04 pm, edited 1 time in total.
Reason: tagged solved
OOo 2.3.X on Ms Windows XP
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: "SUM" Function doesn't work

Post by Hagar Delest »

Can you upload such file (see: How to attach a document here)?
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Dave
Posts: 1011
Joined: Sun Dec 23, 2007 6:53 pm

Re: "SUM" Function doesn't work

Post by Dave »

"they don't work anymore"

What DO they do?

David.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: "SUM" Function doesn't work

Post by acknak »

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.
AOO4/LO5 • Linux • Fedora 23
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: "SUM" Function doesn't work

Post by Villeroy »

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 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
keme
Volunteer
Posts: 3699
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: "SUM" Function doesn't work

Post by keme »

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 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
thaitang
Posts: 2
Joined: Tue Nov 04, 2008 9:39 am

Re: "SUM" Function doesn't work

Post by thaitang »

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
User avatar
keme
Volunteer
Posts: 3699
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: "SUM" Function doesn't work

Post by keme »

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 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
thaitang
Posts: 2
Joined: Tue Nov 04, 2008 9:39 am

Re: "SUM" Function doesn't work

Post by thaitang »

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
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: "SUM" Function doesn't work

Post by TheGurkha »

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
keme
Volunteer
Posts: 3699
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: "SUM" Function doesn't work

Post by keme »

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 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
xgenhanx
Posts: 6
Joined: Sat Dec 17, 2011 3:04 pm

Re: "SUM" Function doesn't work

Post by xgenhanx »

I have a column of dollar values that I want to sum. =SUM(C1:C39) does not calculate.
Open Office 4.1.6 Windows 10
OpenOffice 3.3 on Windows 7
User avatar
Zizi64
Volunteer
Posts: 11352
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: "SUM" Function doesn't work

Post by Zizi64 »

I have a column of dollar values that I want to sum. =SUM(C1:C39) does not calculate.
Because they are strings but not numeric values.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
robleyd
Moderator
Posts: 5055
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: "SUM" Function doesn't work

Post by robleyd »

This sounds similar to a problem you asked about previously.

As suggested above, select menu item View - Value highlighting. Number constants will show in blue, text constants black, and formula results green. Text values will not sum.

See [Tutorial] Text to Columns for ways to convert some text values to numeric. If you are importing these values from a CSV file, make sure you check the option to Detect Special Numbers.

You might find it useful to review [Tutorial] Ten concepts that every Calc user should know
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.1.2; SlackBuild for 24.2.1 by Eric Hameleers
xgenhanx
Posts: 6
Joined: Sat Dec 17, 2011 3:04 pm

Re: "SUM" Function doesn't work

Post by xgenhanx »

Solved.
OpenOffice 3.3 on Windows 7
User avatar
Zizi64
Volunteer
Posts: 11352
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: "SUM" Function doesn't work

Post by Zizi64 »

OpenOffice 3.3 on Windows 7
Please update your signature in this forum. I can not believe that you are using that very old version of the OpenOffice.

And please create a new topic for your problem in another time, in another cases. Or use your similar topic if you want to continue the discussion about the problem.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Post Reply