LET Function for Dynamic Reporting in Single Cell. Excel Magic Trick 1673

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024

Комментарии • 144

  • @excelisfun
    @excelisfun  4 года назад +7

    Topics:
    1. (00:00) Introduction.
    2. (00:19) Three Formula Solution
    3. (00:34) Formula only works in Microsoft 365 Excel.
    4. (00:55) UNIQUE Function
    5. (01:22) SORT Function with array in second argument to sort first, then second column.
    6. (01:46) LET Function.
    7. (02:14) CHOOSE Function
    8. (03:00) Excel Wizard Two Table trick inside CHOOSE.
    9. (04:16) SUMIFS Function
    10. (04:30) INDEX Function to lookup column.
    11. (05:28) Conditional Formatting
    12. (06:30) Add new data and watch report update.
    13. (06:35) Summary and End Video Links

  • @MalinaC
    @MalinaC 4 года назад +2

    Cool trick with CHOOSE! Thanks to both Excel Wizard and ExcelIsFun for sharing :)

  • @wayneedmondson1065
    @wayneedmondson1065 4 года назад +5

    Hi Mike and Excel Wizard.. AWESOME!! I've been trying to figure this out since EMT 1671. Of course, now that you have shown the path, it seems so logical. Thanks for the insights. For anyone who does not yet have LET, the formula construct is: =CHOOSE({1,2,3},INDEX(SORT(UNIQUE(fSales[[Date]:[Product]]),{1,2}),,1),INDEX(SORT(UNIQUE(fSales[[Date]:[Product]]),{1,2}),,2),SUMIFS(fSales[Sales],fSales[Date],INDEX(SORT(UNIQUE(fSales[[Date]:[Product]]),{1,2}),,1),fSales[Product],INDEX(SORT(UNIQUE(fSales[[Date]:[Product]]),{1,2}),,2)))
    Double thumbs up for ExcelIsFun and Excel Wizard!!

    • @excelisfun
      @excelisfun  4 года назад +2

      Double thumbs up for your cool formula, Wayne : ) : )

    • @ExcelWizard
      @ExcelWizard 4 года назад +1

      Thanks to you too. 👍

  • @Softwaretrain
    @Softwaretrain 4 года назад +2

    Thank you Excel Wizard and Mike and all of the teams that joins and provide clever solutions. I didn't know about the logic of Choose in this way and it was really cool.

    • @excelisfun
      @excelisfun  4 года назад +1

      It is really cool. I first tried CHOOSE({1,2,3},INDEX(u,,1),INDEX(u,,2),SUMIFS), but I guess since CHHOSE just can't join more than one column at a time, so Excel Wizard's CHOOSE({1,2,3},u,u,SUMIFS) is really cool. Go Team!

  • @DougHExcel
    @DougHExcel 4 года назад +1

    Neat use of the LET (with other dynamic array functions). Thanks Mike and Excel Wizard!

  • @jimfitch
    @jimfitch 4 года назад +1

    Thank you to Excel Wizard for coming up with that formula, and thank YOU for this tutorial to teach it! I am so eager for GA of LET. I've had so many use cases for it, but I'm wary after having jumped way out in front of XLOOKUP which changed significantly when it reached GA. (Not a complaint ... I was fully aware of the risk, so that's why I'm wary now.)
    I use dynamic arrays quite a bit now & almost always use dynamic arrays for formatting. FWIW, I use NOT(ISBLANK($F5)) instead of $F5"". I don't have any big data concerns, but I figure the evaluation of a boolean value is faster a text string search. Don't know if that's valid. I also prefer the way it looks.
    It's great to have you back, too!

    • @excelisfun
      @excelisfun  4 года назад +1

      Yes, I use that about half the time also. NOT(ISBLANK($F5)) only checks for empty cells, the other checks for zero length text string or empty cell. As long as we are aware and choose the right one when it matters, either is fine : )

    • @jimfitch
      @jimfitch 4 года назад

      ExcelIsFun - Right! As long as we REMEMBER! (I was aware, but had forgotten.) Thanks. 🙂

  • @JohnOConnor1963
    @JohnOConnor1963 4 года назад +5

    This just blew my mind.

  • @kiwikiow
    @kiwikiow 4 года назад

    LET is cool. Very enjoy watching this video. Thank you Excel Wizard and Mike for giving knowledge 🙂🙏

  • @RubinGnoni
    @RubinGnoni 3 года назад

    You've been my Excel Guru for years, but I confess this time I'll need to watch the video many times to assimilate it.

    • @excelisfun
      @excelisfun  3 года назад

      It is worth the effort, for sure : )

    • @bobgreenfield9158
      @bobgreenfield9158 Месяц назад

      I say create the example on your computer and do exactly what he is doing.
      While doing this, you could pause the video and experiment with other ideas.

  • @mattschoular8844
    @mattschoular8844 4 года назад

    Nicely done Excel Wizard. More reasons why ExcelIsFun. Thanks guys....

    • @excelisfun
      @excelisfun  4 года назад

      More reasons why ExcelIsFun!!!! Go Team!!!

  • @johnborg6005
    @johnborg6005 4 года назад +1

    Thanks Mike and to Excel Wizard. Simply amazing!!! :) :)

  • @GeertDelmulle
    @GeertDelmulle 4 года назад +1

    WOW! Awesome!
    This takes single cell calculations to a whole new level! I'm amazed!
    Expect double sonic boom! :-)

    • @excelisfun
      @excelisfun  4 года назад +1

      Agreed: Double Sonic Boom!!!!

  • @arendlagemaat1961
    @arendlagemaat1961 2 года назад +1

    Thank You Mike!!!

  • @nadermounir8228
    @nadermounir8228 2 года назад +1

    Lovely formula Thank u Mike

    • @excelisfun
      @excelisfun  2 года назад

      You are welcome, Nader : ) : ) : ) : )

  • @timwhite8952
    @timwhite8952 4 года назад

    The Let function looks amazing. Waiting for the Let to appear as a function in my Office Insider.

  • @ogwalfrancis
    @ogwalfrancis 4 года назад +1

    That's indeed very extraordinary, thanks Mike

    • @excelisfun
      @excelisfun  4 года назад

      You are welcome, Ogwal : )

  • @krn14242
    @krn14242 4 года назад +1

    Wow, thanks Mike

    • @excelisfun
      @excelisfun  4 года назад

      You are welcome, WRH : )

  • @chrism9037
    @chrism9037 4 года назад +1

    Outstanding video Mike, thanks!

  • @HusseinKorish
    @HusseinKorish 4 года назад

    All in just one formula ? ....that's Amazing ... thanks Mike

  • @pietjehans206
    @pietjehans206 2 года назад

    Was looking for ages for this! Thanks

  • @simfinso858
    @simfinso858 4 года назад

    So many things that i need to learn Yet but thanks I have Subscribed to this channel. This video is helpful in Inventory Management.

    • @excelisfun
      @excelisfun  4 года назад +1

      Always glad to help, Teammate SIMFINSO!!!!

  • @rachidelbargui9451
    @rachidelbargui9451 3 года назад +1

    The LET() function is now available in Excel for Microsoft 365.
    Version 2010 (build 13328.20408)

  • @mmbcampus
    @mmbcampus 2 года назад

    This is an amazing formula. 🖤🖤🖤

  • @ricos1497
    @ricos1497 4 года назад

    Great stuff Mike. I've done quite a bit with these since LET came out. I even managed subtotals and including headers in a single cell. The bit I'm stuck on is trying to create a single formula for a variable number of columns. In your example, imagine you didn't know that it was just Date and Product that you were grouping by. I was trying to see - just as a challenge - if I could create a re-usable LET function for grouping data, whereby the user just enters the data range, the columns they want to group, sort by and sum and the calculation will work for any number of columns. I get to the SUMIFS part, and I realise that there is no way to write that without stating Criteria1, Range1, Criteria2, Range2 etc. It doesn't accept an array of columns like Criteria{1,2,3}, Range{1,2,3}. I'll keep working at it!
    Incidentally, I make it re-usable by only entering the column names (Date.Product for groupCols, and Sales for sumCols) in my LET function and use XMATCH to return the column numbers for use in the INDEX function. That way I can simply change the names if it was a larger table with more columns. It's taking LET to the extreme of course by declaring everything that moves as a variable, but it raises some interesting thoughts. I'll throw up my version if I get a spare minute tomorrow. It's horrendously long!

    • @excelisfun
      @excelisfun  4 года назад +2

      You are on the outer edges of Excel awesomeness!!! Yes, I do not know how to do the array of columns like Criteria{1,2,3}, Range{1,2,3} in SUMIFS. I can't wait to see the horrendously long formula : )

  • @alexkim7270
    @alexkim7270 3 года назад

    I miss hearing your teaching, Mike. Thank you for posting, although I only realised I hadn't been hearing you for a while, when I was coding in other languages. I hope you're fine!

    • @excelisfun
      @excelisfun  3 года назад

      Yes, sir! Great to have you boomerang back after coding in other languages, Alex Kim : ) I am doing okay during covid, but not great. I hope you are well!

  • @ExcelAZ
    @ExcelAZ 4 года назад

    You always rock Mike!

    • @excelisfun
      @excelisfun  4 года назад +1

      Glad it rocks for you, Excel (A-Z)!!!

  • @pmsocho
    @pmsocho 4 года назад +2

    Great trick! Almost like BillSzysz :)

    • @excelisfun
      @excelisfun  4 года назад

      Thanks, Teammate pmsocho : ) : ) : ) : )

  • @darrylmorgan
    @darrylmorgan 4 года назад

    Boom!Wow What A Wicked Formula Big Thumbs Up...Thank You Mike :)

    • @excelisfun
      @excelisfun  4 года назад

      You are Wicked-Boom Welcome, darryl : )

  • @B1897forzajuve
    @B1897forzajuve 2 года назад

    Hi Mike. I was playing a bit with LET and this is the final result.
    =LET(u,SORT(UNIQUE(fSales[[Date]:[Product]]), {1,2}),d,fSales[Date],p,fSales[Product],s,fSales[Sales],ione,INDEX(u,,1),itwo,INDEX(u,,2),
    CHOOSE({1,2,3},u,u,SUMIFS(s,d,ione,p,itwo)))
    Does this construction make LET more efficient than the one in the video?
    p.s. Thank you for your complexed example. It helped me to learn LET and LAMBDA functions a lot faster than usual. Hope you are better now.

  • @edge5817
    @edge5817 4 года назад

    Amazing LET function... Super like Mike!

    • @excelisfun
      @excelisfun  4 года назад

      Glad you like it! LET and Excel Wizard are great : )

  • @maheshvinchhi3785
    @maheshvinchhi3785 4 года назад

    Nice... Everytime you come up with unique video... Great.. Sirji... Liked

    • @excelisfun
      @excelisfun  4 года назад +2

      Glad you like it, Mahesh!!!! Excel Wizard gave us a gift : )

  • @OakleyTurvey
    @OakleyTurvey 4 года назад +1

    Wizard makes Magic Fun

    • @excelisfun
      @excelisfun  4 года назад +2

      Excel Wizard Magic Fun!!!!

  • @reishlion4394
    @reishlion4394 4 года назад

    Great video

    • @excelisfun
      @excelisfun  4 года назад

      Glad you like it, Reish!!!

  • @amit12000
    @amit12000 4 года назад

    Great Mike

  • @ExcelInstructor
    @ExcelInstructor 2 года назад

    Superb!

  • @iankr
    @iankr 2 года назад

    Excellent

  • @mahansor8295
    @mahansor8295 4 года назад

    Great as always Mike 👌🙏 thanks.

    • @excelisfun
      @excelisfun  4 года назад +1

      You are welcome, Mehran!!!

  • @aljamri2011
    @aljamri2011 4 года назад +2

    Mike ... this formula is like 10 steps back ... Time = Money .. I would just use pivot table instead :)

    • @excelisfun
      @excelisfun  4 года назад +2

      It is not steps back. You are right that time equals money, but you must know your project goals to make money. Formulas are for instant update. PivotTables are for ease of use. Both exist and have there use. There are a significant percentage of model solutions that require this instant update. Formulas are great for that.

    • @jimfitch
      @jimfitch 4 года назад +1

      I’m using dynamic arrays instead of pivot tables for most uses these days for 2 main reasons: (1) dynamic update (no requirement to refresh); & (2) design flexibility in the output “table”. Reason 1 was my initial motivation to start the shift from PT to DA, but Reason 2 has overtaken it by far. I have been amazed at how much better my DA “tables” accomplish what I’m trying to do. There’s still a place for pivot tables, especially Power Pivot Tables that use the data model, but most uses for which I’m building are handled better with DAs.

  • @Al-Ahdal
    @Al-Ahdal 2 года назад

    Mike, if you please check F9 evaluation in this video for SORT inside LET, its working but in the CHOOSE its not working. LET function partly working, kindly educate on that.

  • @johnmontojo4664
    @johnmontojo4664 3 года назад

    Hi Sir! This may not be the topic of this video but let me ask how to deal with results of data in the power query that has a little bit of variance when compared or checked with the source data. Thanks

  • @mohamedchakroun4973
    @mohamedchakroun4973 4 года назад

    Great mike a nice trick make the head spin :-)

  • @user-ji8mj6tm3h
    @user-ji8mj6tm3h 4 года назад

    It's amazing, Mike!

    • @excelisfun
      @excelisfun  4 года назад +1

      Glad you like it! It is great that Excel Wizard thought it up : )

  • @Al-Ahdal
    @Al-Ahdal 2 года назад +1

    In Excel, if cell contains 0 value and another cell contains blank, if we compare two these showing TRUE, in actuality this is not the case. And another thing is that, if the formula returns double quote “”, then it evaluates differently for comparison purposes. I am of the view that there must be the formulas to check this in simple way. ISNULL () or ISEMPTY() ISZERO() . Mike please advise on this, and kindly make one video how to compare in this situation when we don't have simple formulas (shown above).
    ******
    Though I did with this =IF(ISBLANK(C3),"",IF(C3=0,B3,"")) but if this is available ISNULL () or ISEMPTY() ISZERO().... it will be quite handy,

    • @excelisfun
      @excelisfun  2 года назад +1

      1) Yes, in a formula, an empty cell always evaluates to zero. So empty cell and zero compared with equal sign is TRUE.
      2) A 'zero length text string' or 'null text string', "", is text with zero length. Text can never equate to a number.
      3) an empty cell and a zero length text string have always been different.
      All three have always been true in Excel.
      The confusion comes from the majority of Excel users and Excel bloggers and books writes using the wrong words. Even I did it early in my career.
      I have made many videos about over years. Here are two:
      ruclips.net/video/DOtrWoXSBjA/видео.html Excel Magic Trick 784: Empty Cells OR Formula Created Blank: Confusion Over Word "Blank"
      ruclips.net/video/DES3PDba17c/видео.html Excel Magic Trick 972: Empty Cell or Null Text String in Formulas: Counting Formulas

    • @Al-Ahdal
      @Al-Ahdal 2 года назад +1

      @@excelisfun Thank you boss

    • @excelisfun
      @excelisfun  2 года назад

      @@Al-Ahdal Yes, check out those videos - they have a lot of good detail : )

  • @RobLego
    @RobLego 3 года назад

    Is it possible to do this same kind of thing but with TextJoin? Say, if instead of summing sales, you wanted to TextJoin some other text column?

  • @Al-Ahdal
    @Al-Ahdal 2 года назад +1

    Dear Mike, I got response from MS that the support case has been closed, what does it means, as the issue is not resolved? I asked regarding the "LET" issue with regard to F9 evaluation key. Will it be available as "office insider"?

    • @excelisfun
      @excelisfun  2 года назад +1

      I do not know what it means. You often ask me what Microsoft is doing. The problem is, that although Microsoft designates me as a Microsoft MVP for my efforts of providing free education to the world, I have no connection or influence over what they do. I occasionally get to talk with people from Microsoft. But I do not work for Microsoft and no influence over what they so. I am sorry that I can not help you more with relaying information to them. All I can do is try to provide free Excel and Power Tool education to the world, independent of what Microsoft does... : (

    • @Al-Ahdal
      @Al-Ahdal 2 года назад +1

      @@excelisfun, boss you're doing the greatest service to Excel Lovers, and we're always thankful to you. You're absolutely a super heavy weight when it comes to Excel, and your teaching style is on other level..... 👍

  • @davidberger9882
    @davidberger9882 4 года назад

    Great!

    • @excelisfun
      @excelisfun  4 года назад

      Glad you like it, David : )

  • @mmbcampus
    @mmbcampus 2 года назад

    Hi Mike, If I want to ask for any excel formula, then how I can send my excel workbook or screen picture for an explanation?

  • @anil11996
    @anil11996 4 года назад

    Well come , long time

    • @excelisfun
      @excelisfun  4 года назад

      Yes, nice to see you, Anil : ) It has been a long time.

  • @M1and5M
    @M1and5M Год назад

    Can you make charts out of this single cell Report?

  • @ruroshinzynaruto
    @ruroshinzynaruto 4 года назад

    Thank You so much.

    • @excelisfun
      @excelisfun  4 года назад +1

      You are welcome so much, Naruto : )

  • @mr.brownstone5716
    @mr.brownstone5716 4 года назад

    What's the advantage of a complex single-cell formula vs. three normal complexity formulas?

    • @excelisfun
      @excelisfun  4 года назад +2

      It means you only have to edit 1 formula, manage only one formula. If we look back at Excel Magic Trick 1671, this single cell formula is easier : )

  • @DatNguyen-lq9lf
    @DatNguyen-lq9lf 4 года назад +4

    when you do the UNIQUE functions, you select like [Date]:[Product] because they are next to each other. What if in the raw data, the [Date] and [Product] are not next to each other, how do you just select these two columns but not the all the columns between the two.

    • @ExcelWizard
      @ExcelWizard 4 года назад +1

      Please try =UNIQUE(CHOOSE({1,2},fSales[Date],fSales[Product]))

    • @Ritameilo
      @Ritameilo 4 года назад

      Dat Nguyen looooilooooooo

    • @Ritameilo
      @Ritameilo 4 года назад

      Dat Nguyen oooolooooooo

    • @Ritameilo
      @Ritameilo 4 года назад

      Dat Nguyen ooooloooooooo

    • @Ritameilo
      @Ritameilo 4 года назад

      Kooooooooooooooooooo

  • @nndv2383
    @nndv2383 4 года назад

    question now is how do you sort decending on total sales...

  • @Sai-tek
    @Sai-tek 6 месяцев назад

    So the reason we are using the variable "u" twice and sumifsto return the 1st, 2nd and 3rd columns. But the first "u" will return 1st column and the second "u" will return second column. It's because the function choose will return only a single column. Am I correct

    • @Sai-tek
      @Sai-tek 6 месяцев назад

      It can only do one column at a time 3:34

  • @GenePatNic
    @GenePatNic 4 года назад

    Here's another dynamic array formula:
    =SORT(UNIQUE(CHOOSE({1,2,3},fSales3[Date],fSales3[Product],SUMIFS(fSales3[Sales],fSales3[Date],fSales3[Date],fSales3[Product],fSales3[Product]))),{1,2})

    • @excelisfun
      @excelisfun  4 года назад

      Thanks for the formula, Daniel : )

  • @Mahmudcma
    @Mahmudcma 4 года назад

    Amazing !!!

    • @excelisfun
      @excelisfun  4 года назад

      Glad it is amazing for you, Abdullah!!!

  • @Al-Ahdal
    @Al-Ahdal 2 года назад

    Boss, don't you think that we should have user id and password in NAMED MANAGER, so no one can able to see inside of the formula. What you suggest on that?

    • @Al-Ahdal
      @Al-Ahdal 2 года назад

      Please respond on this.

  • @mamadoubah3686
    @mamadoubah3686 4 года назад

    It is amazing but complex.

    • @excelisfun
      @excelisfun  4 года назад

      True : )

    • @levarhiggs3174
      @levarhiggs3174 4 года назад

      Feels over-engineered... like opening an Amazon box with a Swiss Army Knife when the butter knife on the table would have worked just fine (this happened to me recently. Lol)

  • @ramidababou
    @ramidababou 3 года назад

    how to use unique function with sumproduct

  • @AjaySingh-ll5qw
    @AjaySingh-ll5qw 4 года назад

    Nicee

  • @kaykhanom
    @kaykhanom 4 года назад

    Hi I have a score table ie. Political Issues =1, Medical issues =2 and a cell that contains Political Issues Medical issues. How do i get the cell next to it to return the sum of Political Issues Medical issues= 3 Please Help

    • @excelisfun
      @excelisfun  4 года назад

      I am sorry but I do not understand your situation... : (

  • @exceldoctor4567
    @exceldoctor4567 4 года назад

    This is great...but, wouldn't it be a lot easier just doing it in Power Query?

    • @excelisfun
      @excelisfun  4 года назад

      PivotTable is by far the easiest. Power Query and PivotTable require a refresh of the data. Which many times is no problem. But for instant update, like many solutions require, formulas are the only way to do this.

    • @TheExceleer
      @TheExceleer 4 года назад

      @@excelisfun Indeed! You can't beat this speed (on small data at least). Amazing!

  • @Al-Ahdal
    @Al-Ahdal 4 года назад

    First to comment.... Great as always.

    • @excelisfun
      @excelisfun  4 года назад

      You get the first place trophy!!!

  • @Chuckk12
    @Chuckk12 2 года назад

    Seems a lot easier to just do a pivot table..

  • @jeffkasavan93
    @jeffkasavan93 4 года назад

    Cool! So at 1:56 when you select LET function, I see a function “ProblemløserSlet”. What’s that all about?

    • @excelisfun
      @excelisfun  4 года назад

      I do not know. I have never used it. Anyone else know?

    • @lewitmi
      @lewitmi 4 года назад

      @@excelisfun I'd guess it's from some add-in you have that didn't use the Private keyword in the function definition. I suppose you can check this by testing if the suggestion appears when Excel is in safe mode.

    • @jeffkasavan93
      @jeffkasavan93 4 года назад

      @@excelisfun Over at www.computerworld.dk/eksperten/spm/972563 I see this term - it seems to be a Danish version of a VBA Solver add in..farther down the page are English versions of these commands from the macro: SolverOK, SolverDelete, SolverAdd, SolverSolve.

  • @sukhdevsingh-xm8nz
    @sukhdevsingh-xm8nz 4 года назад

    Is this formula available in excel 2016 excel yes or no

    • @excelisfun
      @excelisfun  4 года назад +1

      No. I said this at the 00:34 minute mark ; )

  • @Al-Ahdal
    @Al-Ahdal 2 года назад +1

    I couldn't see any benefit of using LET function, because F9 Evaluation key is not working inside LET, and that makes it very difficult to use it. I request you sir (Mr. Mike) to kindly suggest microsoft team to add F9 key throughout its product, whether PQ, BI or any function, F9 key must work. Secondly, it is also request that in NAMED MANAGER, there must be user id, pwd.... so our formulas couldn't be seen by the user, and they cannot go inside NAME MANAGER and see the formulas etc. Please Mr. Mike help the community in this regard. Thanks in advance.

    • @excelisfun
      @excelisfun  2 года назад

      I am in full agreement, Syed : ) I can ask, but Microsoft usually does not listen... : (

    • @Al-Ahdal
      @Al-Ahdal 2 года назад

      @@excelisfun, I shared it on multiple sites, blogs of MS but till to date no response. As you are an MVP, please provide email or something, so can write to them. All subscribers of this channel is requested to please contact Microsoft to include F9 evaluation key across Excel, PQ, BI.

    • @Al-Ahdal
      @Al-Ahdal 2 года назад

      @@excelisfun, plus what's your input on NAMED RANGES that I shared above??

    • @Al-Ahdal
      @Al-Ahdal 2 года назад

      @@excelisfun, Sir please do ask on both points and please do send them email or provide the email of development team or respective resource so we can follow up. Thanks

    • @excelisfun
      @excelisfun  2 года назад

      @@Al-Ahdal It doesn't work that way. I have no influence with Microsoft just because I am an MVP. I am sorry I can not help you with this better. All I can do is try and make good videos to help people for free.