| View previous topic :: View next topic |
| Author |
Message |
canuck_newbie Newbie

Joined: 03 Dec 2005 Posts: 4
|
Posted: Sat Feb 18, 2006 8:23 pm Post subject: Sum Function Doesn't Work in Calc? |
|
|
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 |
|
 |
noranthon Super User

Joined: 07 Jul 2005 Posts: 3318
|
Posted: Sat Feb 18, 2006 9:02 pm Post subject: |
|
|
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 |
|
 |
David Super User


Joined: 24 Oct 2003 Posts: 5668 Location: Canada
|
Posted: Sun Feb 19, 2006 8:15 am Post subject: Re: Sum Function Doesn't Work in Calc? |
|
|
| 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 |
|
 |
canuck_newbie Newbie

Joined: 03 Dec 2005 Posts: 4
|
Posted: Sun Feb 19, 2006 10:22 am Post subject: |
|
|
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 |
|
 |
Dale Super User

Joined: 21 Feb 2005 Posts: 1440 Location: Australia
|
Posted: Mon Feb 20, 2006 8:29 pm Post subject: |
|
|
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 |
|
 |
RickRandom Super User

Joined: 27 Jan 2006 Posts: 1082 Location: UK
|
Posted: Mon Feb 20, 2006 10:00 pm Post subject: |
|
|
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 |
|
 |
RealGrouchy OOo Enthusiast


Joined: 25 Jan 2006 Posts: 144 Location: Ottawa, Canada
|
Posted: Mon Feb 20, 2006 10:22 pm Post subject: |
|
|
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 |
|
 |
jasondodd General User

Joined: 25 Mar 2005 Posts: 20 Location: Colo, Iowa
|
Posted: Tue Feb 21, 2006 5:57 am Post subject: |
|
|
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 |
|
 |
PaulDriver General User

Joined: 23 Feb 2006 Posts: 5
|
Posted: Thu Feb 23, 2006 1:11 am Post subject: |
|
|
| 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 |
|
 |
|