I'm trying to dissect the following formula to better understand. Where can I find the information for s and t please? Its not in name manager.
=LET(t,ALL!$K:$K,s,SEQUENCE(ROWS(t)),MAX(FREQUENCY(IF(t="W",s),IF(t<>"W",s))))
Thanks.
I'm trying to dissect the following formula to better understand. Where can I find the information for s and t please? Its not in name manager.
=LET(t,ALL!$K:$K,s,SEQUENCE(ROWS(t)),MAX(FREQUENCY(IF(t="W",s),IF(t<>"W",s))))
Thanks.
Last edited by Marvo; 03-27-2024 at 08:59 AM.
=LET(t,ALL!$K:$K,s,SEQUENCE(ROWS(t)),MAX(FREQUENCY(IF(t="W",s),IF(t<>"W",s))))
T is defined by the bit in red and s by the bit in blue.
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU
So the idea is once you've written it once, you don't have to write it again?
If you think of =LET() as being a bucket, it's easier to understand. It doesn't of itself, actually do ANYTHING.
LET will keep various sub-formulae for convenient (multiple) re-use in the main formula. In your case, there are to subformulae, t & s. Instead of calculating them every time (which then gets slow) they are calculated once and each of them is used twice in the final formula. =LET() enable more complex functions to be calculated with greater efficiency.
Thank you Glenn, I think I understand.
Finally, in these longer and longer formulae, I tend to put all the bits of the raw data that I need IMMEDIATELY after LET... to make it easier to adjust ranges, if needed. They're all there (and only there) at the start of the formula.
In my words, the start of a LET clause sets various parameters that you go on to use in a formula.
So, for example, consider this:
=IF(COUNTIF(A:A,"Marvo")>1,"Happy Days",COUNTIF(A:A,"Marvo"))
which could be condensed to:
=LET(c,COUNTIF(A:A,"Marvo"),hd,"Happy Days",IF(c>1,hd,c))
You can give your parameters (almost) any name you like.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
Thank you Ali. I get it now.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks