Bug 168422 - SUMPRODUCT() refuses to work under unclear conditions. Shows unexpected #VALUE! error.
Summary: SUMPRODUCT() refuses to work under unclear conditions. Shows unexpected #VALU...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.1.1 release
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:26.2.0 target:25.8.2.2 target:...
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2025-09-15 16:58 UTC by Wolfgang Jäger
Modified: 2025-09-30 11:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The announced erxample (34.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-09-15 16:58 UTC, Wolfgang Jäger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Jäger 2025-09-15 16:58:58 UTC
Created attachment 202845 [details]
The announced erxample

V 25.8.1.1. , Win 10 

Strange thing. I have only one example which I will attach.
If the bug is reproducible by others it should be "crucial", "regression".

The attached example was made in pursuit of the user question https://ask.libreoffice.org/t/automatically-expanding-sumproduct-range-according-to-date/126695

I had suggested an alternative solution without SUMPRODUCT(), but tried to demonstrate the equivalence with a solution based on SUMPRODUCT(). 

It didn't work. Onöy erratically the entered formula worked sometimes for one cell, but failed when filled down (#VALUE!).

I now saved the document with V 25.8.1. (release) and opened it with V 7.5.4.2 (from a PortableApps install, 32 bit).
It worked flawlessly as expected, and filling did not cause errors. 

Some QA agent should test if this is reproducible. 
(It is on my system.)
Comment 1 raal 2025-09-15 17:49:37 UTC
I can onfirm with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c2930f9721f5186c5cc96d6ff28eeaa10c205e60
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

#VALUE in cell T11, T12, T16, T17

In version 7.3 are these cells computed.
Comment 2 raal 2025-09-15 18:02:09 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-24.8.
Adding Cc: to Balazs Varga ; Could you possibly take a look at this one?
Thanks
 035b127c3a778061e36d76fba9ebe808522a85f2 is the first bad commit
commit 035b127c3a778061e36d76fba9ebe808522a85f2
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Thu Apr 11 16:26:52 2024 +0200

    source 969ddf72824942be9755a8d14482d6549a2231ce

165957: tdf#160616 - Fix SUMPRODUCT calculation is broken in some cases | https://gerrit.libreoffice.org/c/core/+/165957
Comment 3 m_a_riosv 2025-09-15 21:02:51 UTC
In T12 reducing the formula to:
=SUMPRODUCT($F$9:$F$1008;$Q$9:$Q$1008=Q12)
no error,
but with another column it fails
=SUMPRODUCT($F$9:$F$1008*$E$9:$E$1008;$Q$9:$Q$1008=Q12)
Comment 4 Commit Notification 2025-09-23 08:14:02 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/22c0eb18f5dcaa76d4fc7a65e98e1d20589ced04

tdf#168422 - Fix SUMPRODUCT calculation is broken in some cases

It will be available in 26.2.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 5 Commit Notification 2025-09-23 09:14:10 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/465f423e4995c8ecb1e981db16d2c6b7c11c28ba

tdf#168422 - Fix SUMPRODUCT calculation is broken in some cases

It will be available in 25.8.3.

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 2025-09-23 10:07:24 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/61f99557ef3c210281efb8023b23609ca6eccbd5

tdf#168422 - Fix SUMPRODUCT calculation is broken in some cases

It will be available in 25.2.7.

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 Commit Notification 2025-09-29 14:56:35 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-25-8-2":

https://git.libreoffice.org/core/commit/57d3f9f50574938cbe4b09ef17ff3f6cbb23450f

tdf#168422 - Fix SUMPRODUCT calculation is broken in some cases

It will be available in 25.8.2.

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.