Bug 148843 - AGGREGATE miscalculates a series of single referenced cells if error cells are involved
Summary: AGGREGATE miscalculates a series of single referenced cells if error cells ar...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.4.0 target:7.3.4
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2022-04-29 04:40 UTC by Yoshikawa Yusuke
Modified: 2022-05-13 18:59 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Calculating buggy (8.78 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-04-29 05:12 UTC, Yoshikawa Yusuke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yoshikawa Yusuke 2022-04-29 04:40:49 UTC
Description:
When the error is ignored by sum in the AGGREGATE function, the cell specified next to the error cell is not summed.

Steps to Reproduce:
1.Enter numbers in some cells
2.Create a cell where the calculation formula becomes an error (example: = 1/0)
3.Calculate with the AGGREGATE function.(AGGREGATE(9,6,x,y,z,Error cell,...)

Actual Results:
The number in the cell to calculate before the error cell is ignored.

Expected Results:
I do not understand.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
If you put a number in the error cell, it will be calculated normally.
Comment 1 Yoshikawa Yusuke 2022-04-29 05:12:35 UTC
Created attachment 179833 [details]
Calculating buggy
Comment 2 Regina Henschel 2022-04-29 20:28:07 UTC
It returns the correct value 8, if the cell reference is given as range D2:D8.
Excel returns 8.

Because this function is a COM.MICROSOFT.AGGREGATE LibreOffice should give the same results as Excel.

I have tested it in Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL
Comment 3 Commit Notification 2022-05-06 23:31:06 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4ea44fdb19e568093ab1e0549c3ffa33296a486b

Resolves: tdf#148843 Handle single reference error values correctly

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Eike Rathke 2022-05-06 23:32:13 UTC
Pending review https://gerrit.libreoffice.org/c/core/+/133868 for 7-3
Comment 5 Commit Notification 2022-05-07 19:05:23 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/dad860ac671dd629401ecdf62b804e6e42b176ec

Resolves: tdf#148843 Handle single reference error values correctly

It will be available in 7.3.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2022-05-09 14:02:05 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7d0b19f3ea3932c9c9bd73604987373681440a1c

tdf#148843: sc_mathematical_functions: Add unittest

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 BogdanB 2022-05-13 18:59:50 UTC
Thanks for solving this. It's 8 now.
Verified with
Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: 75f7e057039aaa49558e22d18cad651d11589da9
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded