Bug 132307 - Difference between SUM function and plain addition when part of number is Bolded
Summary: Difference between SUM function and plain addition when part of number is Bolded
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-21 19:15 UTC by Stephane Quenson
Modified: 2020-04-25 07:47 UTC (History)
3 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 Stephane Quenson 2020-04-21 19:15:52 UTC
Steps to reproduce the behavior:
1. Put 100 in cell A1
2. Put 100 in cell A2
3. Put =A1+A2 in cell A3 (result is 200)
4. Put =SUM(A1:A2) in cell A4 (result is 200)
5. Edit cell A1 and bold the two 0's (the cell is now aligned to the left and considered as a text)
Result: A3 contains 200 and A4 contains 100. This is an inconsistent behavior!
Comment 1 m_a_riosv 2020-04-21 20:21:43 UTC
As @Erak has commented in Ask https://ask.libreoffice.org/en/question/239853/is-there-a-way-to-make-bold-the-last-few-digits-of-a-decimal-number-on-calc/

CAVEAT! Doing this will convert a numeric cell content to text content and therefore calculations with that cell will fail.

So not a bug.
Comment 2 Stephane Quenson 2020-04-21 21:25:07 UTC
Sorry but you are not reading correctly. The issue is that two functions that must give the SAME result are giving DIFFERENT results, hence it is an inconsistency and a bug, in my opinion.
Comment 3 m_a_riosv 2020-04-22 06:55:28 UTC
Not because SUM with a range doesn't take care of text cells, and number's bolded become text instead number, comment#1, BTW Erak is a main dev on calc.

Only direct references, but not range references to cells with numbers as text can be taken as numbers, and there is an options in relation it Menu/Tools/LibreOffice Calc/Formula/Detailed Calculation Settings - Custom - Conversion from text to number.

You can use a formula like
 =SUMPRODUCT(IFERROR(VALUE(A1:A2);0))
to get what you like, but being sure that is possible convert the text to number.

Sorry but it's not a bug.