Bug 166610 - IFERROR() wrongly treats valid LET() expressions as errors
Summary: IFERROR() wrongly treats valid LET() expressions as errors
Status: RESOLVED DUPLICATE of bug 164997
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-16 22:15 UTC by Thomas Bernard
Modified: 2025-05-24 11:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
test file for "=IFERROR(LET(x,1,x+1),"LibreOffice too old")" (8.92 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-05-24 09:00 UTC, Thomas Bernard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bernard 2025-05-16 22:15:10 UTC
Description:
In LibreOffice Calc (tested with version 24.8.7.2 Community Edition), the IFERROR() function incorrectly evaluates valid LET() expressions as errors and triggers the fallback value, even though the expression itself calculates correctly outside of IFERROR().

Steps to Reproduce:
1.Enter the following formula in a Calc cell: =IFERROR(LET(x;1;x+1);"LibreOffice too old")

Actual Results:
The formula returns "LibreOffice too old" as if an error had occurred.

Expected Results:
The formula should return 2.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
The LET() function works correctly on its own.
Example:

=LET(x;1;x+1)  →  returns 2

This behavior occurs regardless of whether it's used as an array formula or regular formula.

The bug is not related to formatting, cell type, or other wrappers like TEXT()—they were tested and ruled out.

The workaround using IF(ISERROR(...);...;...) works correctly.

Workaround:

=IF(ISERROR(LET(x;1;x+1));"LibreOffice too old";"LET() works")
Comment 1 m_a_riosv 2025-05-16 23:48:04 UTC
Works for me
Version: 25.2.3.1 (X86_64) / LibreOffice Community
Build ID: d8d1af5f77df955194e52baabe19324532ac8e8b
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: en-US (es_ES); UI: en-US
Calc: CL threaded

Please test in safe mode, Menu/Help/Restart in Safe Mode


Please attach a sample file, reduce the size as much as possible without private information, 
nd paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Comment 2 Thomas Bernard 2025-05-24 09:00:08 UTC
Created attachment 200941 [details]
test file for "=IFERROR(LET(x,1,x+1),"LibreOffice too old")"

I tested this case with a fresh installation of LibreOffice 24.8.7.2 on a Linux box in both Save Mode and Normal Mode. The behavior is identical.

I also changed the localization to rule out localization errors. See specs below:

Specifications:
---------------------------------------------
Version: 24.8.7.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 64; OS: Linux 6.14; UI render: default; VCL: kf6 (cairo+wayland)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
24.8.7-1
Calc: threaded
---------------------------------------------
Version: 24.8.7.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 64; OS: Linux 6.14; UI render: default; VCL: kf6 (cairo+wayland)
Locale: en-US (de_DE.UTF-8); UI: en-US
24.8.7-1
Calc: CL threaded
--------------------------------------------
Comment 3 m_a_riosv 2025-05-24 11:11:13 UTC

*** This bug has been marked as a duplicate of bug 164997 ***