Bug 42818

Summary: EDITING: Bad SUM
Product: LibreOffice Reporter: webmeister
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: CLOSED MOVED    
Severity: normal CC: LibreOffice
Priority: medium    
Version: 3.4.4 release   
Hardware: PowerPC   
OS: macOS (All)   
Whiteboard: BSA
Crash report or crash signature: Regression By:
Attachments: picture of the bad SUM function
ODS file: SUM function not working for me.
ODS File2: Bad SUM without error/warning; yet numbers are used in other calculations

Description webmeister 2011-11-11 06:23:50 UTC
Created attachment 53400 [details]
picture of the bad SUM function

Problem description: SUM function gives a wrong number.

Steps to reproduce:
1. Click on a cell and type =SUM(
2. Select the cells to include.
3. Type ) and return.

Current behavior: It only includes the first 2 cells, instead of the whole selection (adding up to 8 in the attached picture).

Expected behavior: It should add up to 18.67.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; fr; rv:1.9.0.19) Gecko/2011091218 Camino/2.0.9 (MultiLang) (like Firefox/3.0.19)
Comment 1 Rainer Bielefeld Retired 2011-11-13 10:26:48 UTC
NOT reproducible] with "LibreOffice 3.4.4  - WIN7 Home Premium (64bit) German UI [OOO340m1 (Build:402)]" 

@webmeister@axteleats.com:
Please:
- Attach a sample document
- contribute further investigations
  -- shown SUM range after double click on A17
  -- do really all cells contain Numbers? I am pretty sure that A5:A12
     contains texts looking like numbers
Comment 2 webmeister 2011-11-13 15:24:40 UTC
(In reply to comment #1)
> NOT reproducible] with "LibreOffice 3.4.4  - WIN7 Home Premium (64bit) German
> UI [OOO340m1 (Build:402)]" 
> 
> @webmeister@axteleats.com:
> Please:
> - Attach a sample document
> - contribute further investigations
>   -- shown SUM range after double click on A17
>   -- do really all cells contain Numbers? I am pretty sure that A5:A12
>      contains texts looking like numbers

There is no text.  I'll attach the document.  The picture does show the range.
Comment 3 webmeister 2011-11-13 15:26:13 UTC
Created attachment 53489 [details]
ODS file: SUM function not working for me.
Comment 4 Rainer Bielefeld Retired 2011-11-13 22:04:08 UTC
As I expected cells A5:A12 contain texts (that look like numbers), so NOTABUG.

@webmeister@axteleats.com
Contents can be checked easily in various ways. 

1. Enable Value Highlighting in Menu 'View' (or press <control+f8). Afterwards 
   Values in A3:A4 will appear blue, texts in other cells remain black
2. Click on a cell and open Dialog 'Format -> Cells Numbers. You will find
   "Standard" for  A3:A4, but "Text" for A5:A12
3. Insert formula "=sum(A3)" into B3 (shows value "4") and fill B3 to B4:B12 
   using Menu 'Edit -> fill -> Down'. You will find values from A in B4, B5, but 
   "0" in B5:B12, what shows that number value of eqch cell contents in A5:A12 
   is "0", because it's a text.
Comment 5 webmeister 2011-11-14 11:33:08 UTC
Mr. Bielefeld,
First, I want to say thank you for your feedback.  I have major issues with the functionality.

1. These numbers (A3 through A12) are all used in calculations in other cells.  Why should they work with those calculations but not the SUM function?  (I can upload a file with more information.  I cut everything else out to protect my recipe.)

2. Why doesn't the SUM function, or the program, give an error for this?  How do I know it's summing anything properly?  How do I know the SUM function isn't skipping fields that should be included?  (I don't know how this compares with Excel functionality, since I don't have access to it at this time.)

3. If you highlight A3 through A12 and select Format>Cells, you see "Number, General".  You click OK and nothing changes.  (This is why I said the first time that there was no text.)

4. I highlight A5 through A12, and only then does it say "Text."  So, I change it to number formatting and it inserts a single quotation mark in front of every single number, making me edit each cell.  (This is a minor point, I'll admit.)

Thank you for your answers.
Comment 6 webmeister 2011-11-14 11:42:59 UTC
Created attachment 53552 [details]
ODS File2: Bad SUM without error/warning; yet numbers are used in other calculations

This file shows that the numbers are used in other calculations with no problems.  Yet, the SUM function simply skips them.  It gives no error or indication that it skipped anything.
Comment 7 webmeister 2011-11-16 05:40:33 UTC
I will submit separate bug reports.
Comment 8 Björn Michaelsen 2011-12-24 04:35:24 UTC
closing