D2:E16 I have already written the formula, I want to learn more about the LET function
Can someone please help me ? It would be much appreciated. Thanks in advance
D2:E16 I have already written the formula, I want to learn more about the LET function
Can someone please help me ? It would be much appreciated. Thanks in advance
Last edited by choletseng; 02-11-2022 at 09:18 AM.
I'm not sure what you're looking for. The LET function is interesting in that it actually doesn't DO anything (no calculation on its own). A couple of things it's good for is, depending on the formula, using LET can shorten the formula. But what I really like it for is it helps me write a complex formula that makes sense - almost writing it in english. This is good for maintaining a spreadsheet you don't work with often, or one that you have to support that you didn't write, and there's a very complex formula. If the LET function were used, it will be easier to maintain.
Basically you define your variables, and then write your calculation using those defined variables.
Spill array without LET
=IF(MATCH(A2:A16,A2:A16,)=SEQUENCE(ROWS(A2:A16)),CHOOSE({1,2},MAXIFS(B2:B16,A2:A16,A2:A16),MINIFS(B2:B16,A2:A16,A2:A16)),"")
With LET
=LET(a,A2:A16,b,B2:B16,IF(MATCH(a,a,)=SEQUENCE(ROWS(a)),CHOOSE({1,2},MAXIFS(b,a,a),MINIFS(b,a,a)),""))
@Bo_Ry you are so talented , LET worked a charm. That's exactly what I needed , TQVM
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks