https://bugs.documentfoundation.org/show_bug.cgi?id=174203

            Bug ID: 174203
           Summary: Error in a LET variable impacts result even if
                    irrelevant
           Product: LibreOffice
           Version: 27.2.0.0 alpha0+ master
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
=LET(a;A1; b;1/a; IF(a=0; 0; b))

If A1 is blank or equal to 0, b produces a #DIV/0! error, but in that very
case, the calculation makes the value of b irrelevant: the function should
return 0 because a is equal to 0 and b is not involved.

Version 26.8.1.1 returns 0 in this case, and so does Excel, but the Dev version
now returns #DIV/0!.

NOTE: I am not looking for workarounds of this specific simple example. I know
they are possible and one can easily design a dozen of them in a few minutes.
The issue is presented with a very simple problematic formula that can quickly
be reproduced, and that is the point. If you don't see the point, then please
pass on and spend your time on issues you find worth your time, instead of
bringing me in a conversation I don't want to be part of.

Steps to Reproduce:
1. Create a new workbook in 26.8.1.1
2. In cell A2, enter the formula =LET(a;A1; b;1/a; IF(a=0; 0; b)) ==> result is
0
3. Save workbook
4. Open with 27.2.0.0 alpha0+
5. The result of A2 is now #DIV/0!

Actual Results:
One can observe that the behaviour of the Dev version is not in line with the
previous versions, nor with Excel.

Expected Results:
The same result as with version 26.8.1.1,

i.e. 0,

i.e. the value that one can derive regardless of the error status of b.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 27.2.0.0.alpha0+ (X86_64)
Build ID: b09e70041f86410f8d81f86de1d563c3af99c85d
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster;
VCL: win
Locale: en-CA (en_CA); UI: en-GB
Calc: CL threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to