Can the new let() function be used inside a named expression (named range formula)?

For example, if I set a Named Expression as:

LET(x,17,A2+B1)

It results in #NULL! error message in the cell.

Example file (hope it works for you):

named_formula_example_just_1_plus_w_let.ods (12,9 KB)

Works for me with…

2025-04-12 09 01 20

My version was (PortableApps):

Version: 24.8.5.2 (x86) / LibreOffice Community
Build ID: fddf2685c70b461e7832239a0162a77216259f22
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19044); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

The newest PortableApps.com version is 25.2.1 as of 04/14/2025 (Date Updated: 2025-03-21):
LibreOffice Portable Fresh | PortableApps.com

just like me
screenPiC_LO-version_103027

I cannot see any point in the operation with =LET().

Then you should change the LO version.

25.2.2.2

Well, it’s just a test.

=LET(x,17,A2+B1+x)

But you can imagine a longer equation where it’s helpful to declare some variables that are used up front. EG:

=LET(x,a2,min,5,if(x>min,x,min))