OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Sum Function Doesn't Work in Calc?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
canuck_newbie
Newbie
Newbie


Joined: 03 Dec 2005
Posts: 4

PostPosted: Sat Feb 18, 2006 8:23 pm    Post subject: Sum Function Doesn't Work in Calc? Reply with quote

I have pasted data into Calc from a website.

All the numbers appeared to paste properly into several columns. They are all displayed properly.

However, I cannot perform any function on the numbers.

For example, I might have

10.23
45.21

A Sum of the two cells above gives me "0" with the paste values. However, if I manually type in 10.23 and 45.21 the Sum function works.

Any work around?
Back to top
View user's profile Send private message
noranthon
Super User
Super User


Joined: 07 Jul 2005
Posts: 3318

PostPosted: Sat Feb 18, 2006 9:02 pm    Post subject: Reply with quote

Two thoughts. First, (sounds unlikely), check that Tools > Cell Contents > Autocalculate is selected.

Second, check the formatting of the cells and whether the contents are preceded by an apostrophe. The pasted material may be formatted as text. The formula =VALUE() will convert them to values. There's a macro on this thread which will do the same.
Back to top
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Sun Feb 19, 2006 8:15 am    Post subject: Re: Sum Function Doesn't Work in Calc? Reply with quote

canuck_newbie wrote:
I have pasted data into Calc from a website.


A website content is text. You can, if you know the codes, write a complete website in Notepad text editor. So, you are possibly pasting text, as noranthon points out.

You can do that if you then surround the pasted item with VALUE(), but there might be other, better ways suggested.

However ... I just now copied the 10.23 from this website as I type this, and pasted into version 2 of Calc, and it appeared as numeric with no similar problem.

David.
Back to top
View user's profile Send private message
canuck_newbie
Newbie
Newbie


Joined: 03 Dec 2005
Posts: 4

PostPosted: Sun Feb 19, 2006 10:22 am    Post subject: Reply with quote

Thank you for the suggestions.

Tools --> Cell Contents --> Autocalculate was selected.

No they were not imported into Calc as text ('10.23) values.

Not sure what the issue is. I'm halfway through re-typing the values that I need to perform calculations on, so for the moment that might be my work-around.
Back to top
View user's profile Send private message
Dale
Super User
Super User


Joined: 21 Feb 2005
Posts: 1440
Location: Australia

PostPosted: Mon Feb 20, 2006 8:29 pm    Post subject: Reply with quote

For future reference:

I just tripped over this issue myself. In my particular case the problem was a space at the end of each digit. LEFT(A1;LEN(A1)-1) turned it into a number!
(VALUE did not like the trailing space)
_________________
Dale
To err is human, but to destroy your slippers in the process takes a real son of a bitch: Me!

OOo documentation from the source
http://documentation.openoffice.org
Guides, FAQ, How Tos
Back to top
View user's profile Send private message
RickRandom
Super User
Super User


Joined: 27 Jan 2006
Posts: 1082
Location: UK

PostPosted: Mon Feb 20, 2006 10:00 pm    Post subject: Reply with quote

I've had similar problems, now that Dale reminds me, but with several spaces at the end of the number. It was on data extracted from the computerised manufacturing system at work.

The quick way to look for such an occurence was to press F2, and look at whether the cursor was at the last digit, or a space or two away from the last digit.

I have used Find and Replace, i.e. find space, replace with nothing, having first selected the area with the troublesome "numbers", also selecting More Options, Current Selection Only. Otherwise there's the risk of removing all the spaces from the rst of the spreadsheet, where you do want them!
Back to top
View user's profile Send private message
RealGrouchy
OOo Enthusiast
OOo Enthusiast


Joined: 25 Jan 2006
Posts: 144
Location: Ottawa, Canada

PostPosted: Mon Feb 20, 2006 10:22 pm    Post subject: Reply with quote

Just to confirm, you are putting an equals sign before the sum function? (as in "=SUM(A1:B1)")?
_________________
Quite simply, OOo Impress, does not.

XPsp2, OOo 2.3, SeaMonkey 1.1.7, IE v.6.6.6...
Back to top
View user's profile Send private message
jasondodd
General User
General User


Joined: 25 Mar 2005
Posts: 20
Location: Colo, Iowa

PostPosted: Tue Feb 21, 2006 5:57 am    Post subject: Reply with quote

I've had some website "tables" cause the same problem. Usually I can fix it by going over to the next column(say cell B1) and enter =A1*1 and copy down. That converts it to a value for sure.


good luck!
Back to top
View user's profile Send private message Visit poster's website
PaulDriver
General User
General User


Joined: 23 Feb 2006
Posts: 5

PostPosted: Thu Feb 23, 2006 1:11 am    Post subject: Reply with quote

Dale wrote:
For future reference:

I just tripped over this issue myself. In my particular case the problem was a space at the end of each digit. LEFT(A1;LEN(A1)-1) turned it into a number!
(VALUE did not like the trailing space)


I used =SUBSTITUTE(A2;" ";"") to strip any preceding and trailing spaces (as well as any inline) instead of =TRIM(RIGHT(A2;LEN(A2)-1)) or =LEFT(RIGHT(A2;LEN(A2)-1);LEN(A2)-1)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group