+ Reply to Thread
Results 1 to 4 of 4

How to use the LET function to achieve the same effect in one step

  1. #1
    Forum Contributor
    Join Date
    10-02-2021
    Location
    Thailand
    MS-Off Ver
    365
    Posts
    178

    How to use the LET function to achieve the same effect in one step

    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
    Attached Files Attached Files
    Last edited by choletseng; 02-11-2022 at 09:18 AM.

  2. #2
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,837

    Re: How to use the LET function to achieve the same effect in one step

    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.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: How to use the LET function to achieve the same effect in one step

    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)),""))
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    10-02-2021
    Location
    Thailand
    MS-Off Ver
    365
    Posts
    178

    Re: How to use the LET function to achieve the same effect in one step

    @Bo_Ry you are so talented , LET worked a charm. That's exactly what I needed , TQVM

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 07-11-2019, 12:52 PM
  2. [SOLVED] How to achieve this lookup/index & match with IF function?
    By chaiyya345 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-30-2019, 01:23 AM
  3. Replies: 3
    Last Post: 07-07-2017, 01:24 PM
  4. [SOLVED] Stock Chart apparence is different if Macro1 runs step by step not directly !
    By HerryMarkowitz in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-23-2014, 04:31 AM
  5. Macro or Custum Function to achieve +/- 10% of a value
    By prkhan56 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-22-2014, 01:44 PM
  6. [SOLVED] function to achieve following in excel 2007
    By rajxabc in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-21-2012, 10:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1