Is the new LET function more efficient?

Hi All,

I’m trying to learn formula creation, and most relevantly, learn techniques and strategies for spreadsheet optimisation, and I’ve been experimenting with the new(?) LET function.

Before I really deep dive into it (and potentially waste valuable time ), is it generally understood that using the LET function is more efficient across most tasks in a sheet?

Or are there specific areas where it can help and others not??

Thanks in advance for any help you can offer.

Regards.

CT

No.
This function is made for the special cases where a formula without it would need to calculate the same intermediate result repeatedly.
This situation doesn’t occur too often, and the usage of LET() only has a reasonable potential concerning efficiency if the interim results are large arrays or based in a different way on “expensive” calculations.
As far as I can see LET() may mainly be used to get shorter and better understandable formulas.

The idea of LET is primarily to avoid double calculations in formulas like

=IF(VLOOKUP(...)>A1;VLOOKUP(...);A1)

where the two VLOOKUP(...) parts would be the same, and would have to be calculated twice just because the first time the result would be needed to decide which branch to take. The variant with LET would look like

=LET(x;VLOOKUP(...);IF(x>A1;x;A1))

and would only calculate VLOOKUP(...) once.

And of course, LET can self-document it you use telling names in place of x.

Hi Both,

Thanks for the speedy replies.

That’s precisely why I’ve been drawn to look into it. But I get it, there’s “a difference that makes a difference” to be respected here. Thanks for the clarity.

As responded to above, this is exactly what I’m trying to do in the drive for efficiencies in my sheet. I’ve already observed that some end users with brute-force computing power don’t notice the type of slowdowns that users with lesser powered machines tend to complain about.

And as I’ve documented in a small way over on this thread:

`

https://ask.libreoffice.org/t/not-using-offset-in-dynamic-named-ranges/121011

`

I’m making use of ChatGPT to help me really deeply understand the formulas I’m trying to create, but I don’t want to be led down an incorrect blind alley by bad information.

This as well. A part I’ve rapidly come to enjoy.

And Mike, as I know you’re intimately involved in the development of the program, why would ChatGPT think LibreOffice is only hovering around V7 - 7.1 and that LET is a new development? Any clues?

Thanks agan to you guys for the invaluable help as always.

Cheers.

CT

I’m not sure that being a LibreOffice developer gives knowledge about ChatGPT behavior :slight_smile:

What “hovering around V7 - 7.1” might mean?

LET has been implemented in version 24.8 (see the respective help page, and release notes). No idea if that counts as “new development” or not :slight_smile:

Hey Mike,

Fair point! :smile: I just thought it might be some versioning quirk that was known in the space ie: “the versions for Apple Mac run into the 20’s, but Linux builds are in the 7’s” or some such.

It says things like (and it’s said it many times previously, hence my query):

Tip: LET (Calc 7.1+)

If you’re on LibreOffice 7.1 or later, the built‑in LET() function lets you compute CT once inside a single formula without a helper cell:

and

If you are on LO 7.2+, try this

If that still returns “Not found,” you’re probably on 7.1 and don’t have true spilling. In that case you have two options … etc.

Right, that’s what I thought, nowhere NEAR V7, hence my confusion.

Sorry to bore you with inconsequential ChatGPT versioning trivia. I’m sure you’ve got way more productive things to be getting on with. Like building a thoroughly excellent platform that I for one enjoy very much. Thanks, and keep up the good work.

Regards.

CT

1 Like

Since this thread developed to a kind of “general discussion” I feel free to add my 2 cents.
Being 80 and “old-fashioned” possibly, I never tried to have a chat with any A-Eye. However, very few years ago I started to check my texts written in English sometimes using the DeepL.com translator which is AI-based to get them in German (my native language). I’m not always satisfied, but I remember that I was rather repelled as a school boy by the authoritative “Learn English and French!” - and I ask myself if somebody will take the trouble to study foreign languages 20 years from now. Being 10 again I would surely fight against an order to do it. “No use! I have that GearInTheEar!” Want to live on DS9? No!! They are too old-fashioned!
But take a minute to consider if in such a world anybody could do some “communication” without Guuuhgle or their successors knowing every detail.
Well, I should cease this now and have a talk with ChatGPT about my BSM ideas.
===Editing===
Forgot to mention that this post is “pure Lupp”. Don’t blame DeepL.com for the mistakes.

… unless you know the version numbering was changed from the traditional increments to year/month, so you find 24.2 following 7.6 and that is quite “NEAR V7”.

So here it’s clear why “V7” in LibreOffice’s versioning system is completely meaningless notation. Unlike many other projects, in LibreOffice, the two first numbers only constituted the “major” version; the changes between 6.3 and 6.4 were ~same magnitude as between 6.4 and 7.0, and the ~same magnitude as between 7.0 and 7.1 … So the “V7” doesn’t allow anyone to address any single property distinct for the project of that time (well, the large time span of “mid-2020 - mid-2024” is the only thing that can characterize that notation).

And yes, unless you are closely familiar with the (previous) project versioning scheme, that wasn’t immediately obvious. And yes, in the context of this discussion, it’s clear that “V7” in “V7 - 7.1” stands for “V7.0”, so yes, I see why @Clearwell_T says that 24.8 is “nowhere NEAR V7” .

Hey Lupp,

I’m pretty old school myself. I’m 58 and moderately techie, and until recently had never felt inspired to want to work with the AI.

BUT, having finally found myself with a need to try it, I have been very impressed. So far ChatGPT has done some really stupid things and is not 100% reliable, but the future is well within sight at this point.

It hasn’t stopped me wanting to learn, but it sure as hell has made learning certain things (like LibreOffice) a hell of a lot quicker (for me at least, YMMV).

I suspect for the vast majority of people, learning certain things will go the same way as basic arithmetic in the age of the ubiquitous “pocket calculator”. Put it this way, I never got offered a class on Horse-shoeing at school!!?! :sweat_smile:

Cheers, and thanks for the reply.

CT

Hey Wanderer,

Being a newbie, that’s exactly the kind of knowledge I would have missed, but now it all makes sense.

Thanks.

CT

Hey Mike,

Thanks for the reply.

The daft thing is, at some point I clicked on one of those in-text dropdown citation links that Chat GPT randomly throws in, and it went to a version of “LibreOffice 7.xx Help” which made me think ChatGPT is stuck only knowing about LO pre a certain change in the versioning system.

Thanks for helping clear the confusion for me.

Cheers.

CT

For understanding the ReleasePlan - The Document Foundation Wiki

Thanks Earnest. Very helpful. CT

PS,

Since you’re always so unresonably helpful around here ( :smiley:), I wonder if you might have a second to take a look at this issue for me?

As ever, thanks so much for sharing your valuable knowledge. Much appreciated.

Regards.

CT