Bug 160775 - Incorrect Calculation Result in SUM Function with Mixed Data Types
Summary: Incorrect Calculation Result in SUM Function with Mixed Data Types
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-22 09:14 UTC by tikirah710
Modified: 2024-04-22 21:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tikirah710 2024-04-22 09:14:08 UTC
Description:
When using the SUM function in LibreOffice Calc to calculate the sum of a range containing mixed data types (numeric and non-numeric), the calculation result is incorrect.

Steps to Reproduce:
1. Open a new Calc spreadsheet.
2. In cell A1, enter the value "10".
3. In cell A2, enter the value "5".
4. In cell A3, enter the text "Test".
5. In cell A4, enter the formula "=SUM(A1:A3)".
6. Press Enter to calculate the sum.

Actual Results:
The actual result is an error, or in some cases, the result may be the concatenation of numeric and non-numeric values, such as "105Test".

Expected Results:
The expected result is 15, as the SUM function should ignore non-numeric values and only sum the numeric values in the range A1:A3.


Reproducible: Sometimes


User Profile Reset: No

Additional Info:
It affects users who rely on the SUM function to calculate the sum of ranges containing mixed data types.
- The issue persists even after recalculating the spreadsheet or restarting the application.
Comment 1 Robert Großkopf 2024-04-22 13:30:53 UTC
I will get "15" with SUM function in Calc.
So I couldn't confirm any buggy behavior here.

Tested with
Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

And also LO 7.4.7.2 on the same system.

Which version do you use?
Comment 2 m_a_riosv 2024-04-22 21:07:33 UTC
Please test in safe mode, Menu/Help/Restart in Safe Mode