Does Calc have a function similar to LET()?

Microsoft Excel has a =LET() function, which from my understanding allows one to assign names to variables. One use case is avoiding lengthy repetition within a formula. Does LibreOffice Calc have a similar function?


Thanks, @AdmFubar. I’ll certainly look into it, though I’m not too familiar with LibreOffice Basic. I was also hoping to find an in-cell function or formula.

Those actually interested may visit Index of /FreeOfficeRequests.
They will find an explaining text there, and a nearly 4 years old partial and provisional solution (which actually worked in examples).
Recently I reconsidered the topic superficially. However, ther are some facts not making me fond of expending much time on this. Mainly:
-1- Next to nobody seems to need it.
-2- The provisional solution is to fainthearted.
-3- The gain in efficiency may be minimal, partly due to the usage of Basic, partly to the fact that the effivciency of expensive calculations was improved in Calc.
-4- A really adequate usage beyond the most obvious cases may prove to be somehow fragile or error-prone.
There is also a temptation to “revive the project”: The provisional LET() function of Excel365 may be a flop. In specific the second example from the page @erAck linked to is more of an offence than of an offer, imo.
(Don’t prematurely start to use my provisional code.)

The advantage it has is that the sub-expression FILTER(A2:D8,A2:A8="Fred") occurs only once and has to be executed/calculated only once, the second occurrence of filteredRange reusing the result of the first occurrence (or at least that’s what I’d hope how it’s implemented…) which may make a difference in large range calculations.

Yes, of course. Did you glance through my provisional “implementation”: I would prefer to not rule the feature by a function like LET() disposing the helper variable autoamtically on leave, but by a couple of functions applicable much more flexible.

No, LET() is not implemented.

(for the curious: MS365 beta feature LET function - Office Support)

Appreciate it, @erAck.