LET Function Advanced Array Formula for Dynamic Cross Tabulated Report. Excel Magic Trick 1681.

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

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

  • @shareskills37
    @shareskills37 Год назад +3

    You are the best Excel teacher I have seen in my life

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

    Topics:
    1. (00:00) Introduction.
    2. (00:33) Why LET is useful.
    3. (01:25)Data Validation for variable cells.
    4. (01:39) Dynamic Report Label.
    5. (02:02) Row Variable Formula.
    6. (05:03) Column Variable Formula.
    7. (05:39) Single Cell Report Formula.
    8. (14:09) Summary and Video Links.

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

    Yay! Crazy Array formulas are back!... because they never left! :-)
    And you, Mike, are the Master! Wow! The result is awesome! And so is that formula!
    BTW: in this case I’ll take the pivot table any day of the week.Just way simpler.
    That’s not to say that I don’t love the new calc engine: I wouldn’t want to live without it...

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

      Yes, most of us will use a PivotTable, but I have heard of a few people are using formulas just like this for reports and invoicing that they say is perfect!

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

      Well Mike, I “somehow” feel that those people owe you a debt of gratitude. Big time. :-)

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

      @@GeertDelmulle I own them too - since I originally learned this from David Milbrandt : ) : ) Go Team!!!!!!

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

      @@excelisfun Mike/Geert, I can see the attractiveness of something like this. The thing about LET functions is that they are reusable. For this one, just copy it into a workbook, change the source of the drop down lists, the source data and the column and you're there. If you're really smart you can even add subtotals. Formatting is obviously the biggest issue, but then it isn't that great on pivot tables. However, the most amazing thing for me is what it shows can be done. I've done LET functions for a few things now, and each time I've tried to make them as close to reusable as possible (and suceeded on most occasions). If we can write a function that always returns a table with row and column totals based on a data source, a column to SUM, a row and a column field, then Excel can do it. If Excel can do it, and it's repeatable and provable, then its really then up to Microsoft to provide that function as standard (or we can certainly build that case). For example, I've built a SPLIT() function for something I was doing, and a TEXTTOCOLUMNS() function. Now we have a PIVOT() function, and I have done an UNPIVOT() function (sort of) all in LET that can be re-used just by changing the initial variables as you would any other function. The LET function simply takes in variables and performs an algorithm. There is no reason that these can't be shared, proved and then voted on for microsoft to add to it's growing list.
      I vote for PIVOT(DataSource, ColumnField, RowField, ValueField, IncludeHeaders, IncludeTotals) as a function! Which we can now do based on Mike's function, or my one I added elsewhere in the comments! Easy!

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

    I was blown away by this!!! Thank you. I took a step further by using sort by to put the most relevant rows and columns at the top left of the report!

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

    Where was this video 2 years ago?
    Mind-blowing stuff. Thanks a lot 👍👍👍

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

      LET was not around two years ago.

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

    Can’t wait to get this in my MS 365. Nice video Mike!!

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

      I can't wait either : ) : )

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

    Wow!! Blown away by this one! Thanks for a master class on how to bend Excel Functions and Formulas to do your bidding. Absolute Monday Madness!! Thumbs up!!

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

      It is wild madness : ) Glad it was mad for you, Wayne : )

  • @sevagj.b
    @sevagj.b 3 года назад

    WOW Mike, I need to watch the video at least 10 times

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

      I am glad you like it, Sevag!!!

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

    Fortunately LET exists ;). Thumbs up!

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

    Oh my God.This video should be Labeled as How to Make Pivot Table without using pivot table.Super Duper Awesome video.

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

      That is a good idea : )

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

    Just....WOW! NIce job Mike.

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

      Glad you like it, Michael !!!!

  • @iankr
    @iankr Год назад +1

    Brilliant!
    Thanks, Mike.

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

      You are welcome! Here is a newer video with the new functions VSTACK and HSTACK: ruclips.net/video/17U8_6besyI/видео.html

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

    WOW! just WOW!...Thanks Mike.
    Can't wait to have the LEN() function soon!

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

      I can't wait for you to get LET, either : )

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

    Wow ... that's amazing Mike ....every difficult solution is easy with you .

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

      Glad I can help with making it more easy : )

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

    Thank you for a lovely challenge. Here's single cell formula I was able to come up with for this problem:
    =LET(
    VR,INDIRECT("fSales["&K2&"]"),
    UVR,SORT(UNIQUE(VR)),
    VC,INDIRECT("fSales["&K3&"]"),
    UVC,SORT(UNIQUE(VC)),
    Sum,SUMIFS(fSales[Revenue],VR,UVR,VC,TRANSPOSE(UVC)),
    TR,BYROW(Sum,LAMBDA(row,SUM(row))),
    TC,BYCOL(Sum,LAMBDA(col,SUM(col))),
    Total,REDUCE(0,Sum,LAMBDA(i,cell,i+cell)),
    RHeaders,EXPAND(UVR,COUNTA(UVR)+1,,"Total"),
    CHeaders,TRANSPOSE(EXPAND(UVC,COUNTA(UVC)+1,,"Total")),
    Corner,K2&"/"&K3,
    Output,HSTACK(VSTACK(Corner,RHeaders),VSTACK(CHeaders,HSTACK(VSTACK(Sum,TC),VSTACK(TR,Total)))),Output)

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

    Holy Amazing Excel Functions, Batman!! That was FUN!

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

      You are batman welcome!

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

    Mike just awesome thanks for doing the video you are amazing :) Not only is the calculation more efficient but if you need to amend a variable later you only need to do it once! 👍

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

      Yes, that is so true. In fact I did exactly that multiple times as I created the formula : ) : )

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

    That was a great use of new Excel functions! However, Microsoft must return F9 in Let Function to quickly check intermediate results

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

      I HATE that F9 does not work, and that the current version does not allow variables in drop down. It makes the LET function in the current version almost useless. It is just too hard with those bugs.

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

      @@excelisfun Sometimes it is easier to create the old way then convert to use Let via search and replace. Let can make some formulas so much easier to review later that it is worth the double-effort. PS my brain is still aching from following this video lol

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

      @@henryg5735 That is true.

  • @CarlosMartinez-mo8iq
    @CarlosMartinez-mo8iq 4 года назад

    Hey Mike, I remember that a few videos ago you talked about this formula to remove numbers from a cell. it's not the best formula ever, but I think this might work. You may use this formula {=TEXTJOIN("",TRUE,IFERROR(IF(ISNUMBER(NUMBERVALUE(MID(A5,ROW(INDIRECT("1:100")),1))),"",MID(A5,ROW(INDIRECT("1:100")),1)),""))} this will remove all numbers. However, if you'd like to remove text and leave numbers, you may use this one {=TEXTJOIN("",TRUE,IFERROR(MID(A5,ROW(INDIRECT("1:100")),1)+0,""))}

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

      Thanks for the cool formulas : )

  • @Fxingenieria
    @Fxingenieria 24 дня назад +1

    Excelent, thanks EXCELISFUN

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

    Amazing piece of excel skill!

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

      Yes indeed. Thanks, Hassan!!!

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

    Boom!WOW Completely Blown Away What An Awesome Formula...Thank You Mike :)

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

      Boom is for this video boomeranged back in new form : ) : )

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

    This is amazing Mike. I need the LET function in my MS Excel 365. Thanks for sharing

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

      You are welcome for the share, Nono!!!

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

    Wow Mike, this is mnd blowing, thansk for sharing, you're the best 👍👍👍

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

      You are welcome, Stephen!

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

    Absolutely outstanding Mike, thank you 👍

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

      You aer welcome, Paul : ) : )

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

    Good one. Looks like a very complex formula.

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

      VERY. Not necessary 99% of the time, but for the 1% it is perfect : )

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

    This is amazing mike

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

      Glad it is amazing for you, kishor!!!

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

    Thanks Mike. This is a MasterPiece!!! FUN FUN FUN : ) : )

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

      Glad you like the formula FUN, FUN, FUN!!!!

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

    Thanks Mike. This video is really great and useful.

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

      Glad you like it, K D!!!!

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

    Thanks Mike!

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

      You are welcome, David!!!!

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

    I’ve been using LET in almost all my formulas lately. It’s so helpful. Great video. I always name the last formula/calculation as Result/RES for clarifications
    I have noticed versions beyond 13001.20266 on build 2006 do not show the variable names the autocomplete functionality like named ranges, formulas, and table names do. I haven’t checked build 2007 version 13029.20308 yet but the beta version of 2007 a few weeks didn’t work either

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

      Yes, my version is not showing variable name, although earlier versions did show it.

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

      ExcelIsFun what version do you have? The variables weren’t displayed when LET was first released. That functionality was added in a later version. Not sure if it’s been taken out or temporarily disabled. I wish it had color like table names and names ranges. Also I wish table references from other sheets or workbooks had color too

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

      ExcelIsFun I can confirm the LET function does not show variable names in the autocomplete in build 2007 version 13029.20308. Just checked. Reverting back to build 2006 version 13001.20266 for now

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

      @@patrickschardt7724 That is smart to revert back : ) : )

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

    Great Mike

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

      Glad you like it, Amit!!!

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

    Just Wow❗️❗️❗️Amazing 👍

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

      Glad it is amazing for you, Davor : )

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

    Mike, I am making amazing use of this lesson! Thank you! Question: can a third criteria selector be added? Specifically, include the date column as criteria, so User can do everything done here, but limit the report to the date range selected (within the LET function or from with in the same cell as the LET function)?

  • @Hey_Delight
    @Hey_Delight 4 года назад +3

    💖💚💗💙💟

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

      Thanks for the love : )

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

      @@excelisfun Thank you Sir Mike.

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

    01:09 .... what!! Mike I am honored to have inspired for this video to be made! WOW!! I am still waiting for my Excel version to have =LET() .... I am not part of the Insider Program becuase of compatability issues I had before ... : (

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

      Go Team!!!!!!!

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

      Yet, since I don´t have the LET(), I would have indent the formula this way. (forgive me for my "pendantic-ness"!!)
      For the row header:
      =LET(
      RowVariableUniqueList,
      UNIQUE(
      XLOOKUP(
      K2,
      fSalesAnswer[[#Headers], [Customer]:[Product]],
      fSalesAnswer[[Customer]:[Product]] )
      ),
      CountRowVariableUniqueList,
      ROWS(RowVariableUniqueList),
      IF(
      SEQUENCE( CountRowVariableUniqueList+1 ) > CountRowVariableUniqueList,
      "Total",
      SORT(RowVariableUniqueList)
      )
      )
      For the column header:
      =LET(
      ColumnVariableUniqueList,
      UNIQUE(
      XLOOKUP(
      K3,
      fSalesAnswer[[#Headers], [Customer]:[Product]],
      fSalesAnswer[[Customer]:[Product]]
      )
      ),
      CountColumnVariableUniqueList,
      ROWS( ColumnVariableUniqueList ),
      TransposedColumnVariableUniqueList,
      TRANSPOSE( SORT( ColumnVariableUniqueList ) ),
      IF(
      SEQUENCE( , CountColumnVariableUniqueList+1)> CountColumnVariableUniqueList,
      "Total",
      TransposedColumnVariableUniqueList
      )
      )
      And the for magic formula!!!:
      =LET(
      Records, fSalesAnswer[[Customer]:[Product]],
      FieldNames, fSalesAnswer[[#Headers],[Customer]:[Product]],
      RevColumn, fSalesAnswer[Revenue],
      RowUniqueList, J7#,
      ColumnUniqueList, K6#,
      CountRowUniqueList, ROWS( RowUniqueList ),
      CountColumnUniqueList, COLUMNS( ColumnUniqueList ),
      LookupColumnForRowVariable, XLOOKUP( K2, FieldNames, Records),
      LookupColumnForColumnVariable, XLOOKUP( K3, FieldNames, Records),
      IF(
      RowUniqueList & ColumnUniqueList="TotalTotal",
      SUM(RevColumn),
      IF(
      SEQUENCE(, CountColumnUniqueList) > CountColumnUniqueList-1,
      SUMIFS( RevColumn, LookupColumnForRowVariable, RowUniqueList ),
      IF(
      SEQUENCE( CountRowUniqueList) > CountRowUniqueList-1,
      SUMIFS( RevColumn, LookupColumnForColumnVariable, ColumnUniqueList ),
      SUMIFS(
      RevColumn,
      LookupColumnForColumnVariable, ColumnUniqueList,
      LookupColumnForRowVariable, RowUniqueList
      )
      )
      )
      )
      )

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

      Funny fact: I don´t write code or develop VBA, I just like seeing formulas written this way to rapidly spot where the issue is. :P

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

    Amazing

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

      Glad it is amazing for you. P.S. I still think I like the old way better...

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

    Thanks, Mike! I further wanted the transposed column headers to be a part of the single cell report. I was able to append the two (column headers and the output below) by just joining the two arrays with a colon (K2#:K3#) in a separate cell! However, if I try to put that in LET or any other formula, like CHOOSE({1:2},firstarray#,secondarray#), it is not appending without errors. Your valuable thoughts please!

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

    Boss, kindly make a video, solving the same by using VSTACK, HSTACK..... i.e. using single formula. Thanks in Advance,

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

    Total Crazy

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

    Wow, amazing

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

      Glad it is amazing for you, MD Tech!!!

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

    Boss, how to use VSTACK, HSTACK simultaneously to bring in all row headers and column headers in this video and use single formula. Kindly guide on this. Thank you in advance.

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

    Can DGET be used to return multiple values based on a cell value from the same or another worksheet. ( One to many) Lets say we have companies and would like to see the list ( records) of all employees of a selected company with names, titles, email addresses etc.? Also is it possible that these records can be edited/updated right after showing up/ filtering? If not, what would you recommend to use?

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

    Hi, I think the “TotalTotal sum() “gives the unconditional total amount, not specific to “cross table’s” condition

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

      The total total and cross tab total are the same when you have the row area and column area unique list formulas : )

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

    At the risk of sounding smug, I think I can go one better, by including the whole table in one formula:
    =LET(rowVar,K2,
    colVar,K3,
    sumCol,fSales[Revenue],
    tblHdr,rowVar&"/"&colVar,
    xValsAll,XLOOKUP(colVar,fSales[#Headers],fSales[#Data]),
    yValsAll,XLOOKUP(rowVar,fSales[#Headers],fSales[#Data]),
    xHdrs,SORT(UNIQUE(xValsAll)),
    yHdrs,SORT(UNIQUE(yValsAll)),
    cntX,ROWS(xHdrs)+2,
    cntY,ROWS(yHdrs)+2,
    i,SEQUENCE(cntY,cntX),
    x,IF(MOD(i,cntX)=0,cntX,MOD(i,cntX)),
    y,ROUNDUP(i/cntX,0),
    xVal,INDEX(xHdrs,x-1,1),
    yVal,INDEX(yHdrs,y-1,1),
    results,SWITCH(TRUE,x*y=1,tblHdr,((x

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

      To add some explanation, the trick is to use a 2 dimensional sequence rather than just a single column, which represents the table with a sequence of numbers. If you try stepping through the above formula, when you return "i" with a row variable of Product and column variable of Region, you get a 4 row, 6 column sequence table, which is what you'd expect as there are 4 products, plus 2 columns for header and totals. There are 2 Regions, plus 2 for header/totals.
      That's your table mapped, but with a number sequence 1-24 instead of values. As it's dynamic, you need to know what your x and y coordinates are for each instance of "i" and return the value for that coordinate. The MOD formula will get the x value (column number) and the ROUNDUP the y value (row number) (you can test these both in the LET function to prove they return correctly. Finally, use the SWITCH formula to define what is returned for each position in the sequence table. For example ((x

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

      And for more information! Here is a LET function that determines where you are in a table based on the number of rows and columns. Simply change the maxCol,6+2 and maxRow,2+2 to 4+2 and 3+2 or whatever to show the movement of the pivot table (the +2 is to add a column/row for both header and total). It's quite a good illustration, and you would simply add in your data source XLOOKUPS and the SUMIFS formulas in place of Values and Row Total sections in the SWITCH formula:
      =LET(maxCol,6+2,
      maxRow,2+2,
      i,SEQUENCE(maxRow,maxCol),
      x,IF(MOD(i,maxCol)=0,maxCol,MOD(i,maxCol)),
      y,ROUNDUP(i/maxCol,0),
      result,SWITCH(TRUE,x*y=1,"Header",((x

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

      @@ricos1497 Really Great Work! The trick is..you dnt need 2 dim. seq arrays at all. Excel fills the gaps. for example put this in any cell and check the result =SWITCH(TRUE,SEQUENCE(,3)=1,{1;2;3;4},SEQUENCE(,3)=3,{"a";"b";"c";"d"}). See? 2 dim array 4 by 3 with the left and right column added using one dim sequences.
      The same way you can do, top row , bottom row etc. For TRUE you leave the core array that fills itself, no conditions needed, so for all conditions for creating the perimeter of array , left and right column, top and bottom row, only one dim sequence array
      You used SWITCH , I used IFS, more ore less the same. I used very simple 2 dim sequence Only for the corners.

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

      @@Excelambda yes, great suggestion. I always forget about IFS() too, that'd be nicer than switch. I'll have to get the laptop out again and check out your idea. Fantastic.

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

      @@Excelambda I've had a quick test of your suggestion, and I understand it, but I'm not entirely sure how to apply it to the example in the video. Do you have your solution/formula? I'd be quite interested to see it in action.

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

    I love you 😘 man

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

      Glad you love the videos! I love you to, Teammate!!

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

    Hi i found your Videoa very helpfull but i have a question can i subtract multiple cells from one cell for example B1:B10 from A1

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

      Yes. That would be an array subtraction calculation : )

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

      @@excelisfun kindly can you tell me the whole process how do i do it

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

      @@kingandfana =A1-B1:B10

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

    Hey how are you today sir? can u recomended a video where i can make searcheble drop down list.
    i have 4000 items and idea was to make a search bar on top few cels and under is all my product that i selling. but i want when customer tipe few ford of items that he looking for under the search bar made a list of all items that contain that leather.. i hope you understand my bad english. chears

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

    Very interesting, how do I create a power query for a table that contains numbers and text? The numbers contain an employee number that has a letter in it which cannot be removed and it's driving me nuts!

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

      Can you convert it all to text?

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

      You can't have mixed data in a column

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

      @@excelisfun ok thank you, I will try that! I'm trying to streamline my data because I keep making mistakes with my data.

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

    14:11 I do leave comments, alot of them :)

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

      I can't get to all of them, but they HELP the Team Alot!!!! Thanks for helping the Team, Radoslaw : ) : ) : ) : )

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

      @@excelisfun im trying :)
      I also read upon how to get MVP :) and weirdly enough I do contribute on ExcelForum.pl website, I teach excel team I work with in my work, and now here i I find a way to help.
      Maybe even I couldcontribute to your videos somehow :) (altho on't know what I could do :))

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

    Help!!! Do you have a video with retention codes for a warehouse. Example code 94-1 will add 2 years to a box received in 2014 making the destruction date 2016. Also I have over 300 codes with same/different years for each.

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

      I am not sure. try mrexcel.com/forum

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

      Hey thanks!!!

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

    I remember your old formula without XLOOKUP. Now it is easier with XLOOKUP, and it occurred to me to put "*" instead of "Total" and then summing up is very simple.
    formula for list for data from 1528:
    =IF(SEQUENCE(,COUNTA(UNIQUE(INDEX(fRevenue5,,MATCH(I5,fRevenue5[#Headers],0))))+1)>COUNTA(UNIQUE(INDEX(fRevenue5,,MATCH(I5,fRevenue5[#Headers],0)))),
    "*",TRANSPOSE(SORT(UNIQUE(INDEX(fRevenue5,,MATCH(I5,fRevenue5[#Headers],0))))))
    And sum:
    =SUMIFS(fRevenue5[Revenue],XLOOKUP(I4,fRevenue5[#Headers],fRevenue5),H10#,XLOOKUP(I5,fRevenue5[#Headers],fRevenue5),I9#)
    P.S. I use conditional formatting to show "Total" instead of "*"

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

      Very cool trick! Thanks, Teammate : )

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

    Is anyone able to give me a hand with a similar topic, I cannot quite figure out the syntax.
    Say for instance I have a table like this:
    Plant | Material | Q1 Price | Q2 Price | Q3 Price | Q4 Price | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
    I would like the result of my new array using Let to Look like this:
    Plant | | Q1 | Q2 | Q3 | Q4 |
    I was able to use the basic ideas in this video to write something like this
    =LET(
    List,UNIQUE(Forecast[Plant]),
    REVCOL,Forecast[Jan],
    REVCOL2,Forecast[Feb],
    TEST,SUMIFS(REVCOL,Forecast[Plant],List),
    CHOOSE({1,2},List,TEST))
    This results in a table Plant | Jan which correctly summarizes the January volumes by plant -- Now it is time to make a more complex calculation for instance I would normally use:
    =SUM(Filter((Forecast[Jan]+Forecast[Feb]+Forecast[Mar])*Forecast[Q1],Forecast[Plant]=$A1)) using a helper unique list to allow me to summarize what is essentially a sum product function, but I am trying to make that one of the calculations in my LET, such that my end result can be the following, allowing me to control a summary table layout:
    =LET(
    List,Unique(Forecast[Plant])
    Q1,Filter((Forecast[Jan]+Forecast[Feb]+Forecast[Mar])*Forecast[Q1],Forecast[Plant]=List),
    Q2,Filter((Forecast[Apr]+Forecast[May]+Forecast[Jun])*Forecast[Q2],Forecast[Plant]=List),
    Q3,Filter((Forecast[Jul]+Forecast[Aug]+Forecast[Sep])*Forecast[Q3],Forecast[Plant]=List),
    Q4,Filter((Forecast[Oct]+Forecast[Nov]+Forecast[Dec])*Forecast[Q4],Forecast[Plant]=List),
    Choose({1,2,3,4,5,6},Plant,"",Q1,Q2,Q3,Q4))
    Appreciate the help in advance here

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

    How can we anoint you as as the Excel God? Just tell me. I'm all ears!

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

      No Gods here ; ) Just a Team! I make and post videos and Excel files and you watch, learn and thumbs up and comment. Go Team!!!!

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

    Dokywarun gela Mike, sorry...

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

    =LET(MikeGirvin,"Great, Great, Great!",...

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

    It is too complicated for me. I don't seem to have a talent for excel :(

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

      No, no, no..... !!!!! Of course you have talent for Excel : ) : ) This sort of formula is at the outer extreme. Few people do this sort of thing. Forget this sort of stuff and just have fun with Excel that way you have fun with Excel, Kasia : ) : ) : ) : )

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

      Thank you so much for your encouraging reply. :) :)

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

    Please can you speak hindi

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

    I used this one :) =LET(a,SORT(UNIQUE(XLOOKUP(K2,fSalesAnswer[#Headers],fSalesAnswer))),b,TRANSPOSE(SORT(UNIQUE(XLOOKUP(K3,fSalesAnswer[#Headers],fSalesAnswer)))),c,SUMIFS(fSalesAnswer[Revenue],XLOOKUP(K2,fSalesAnswer[#Headers],fSalesAnswer),a,XLOOKUP(K3,fSalesAnswer[#Headers],fSalesAnswer),b),d,BYCOL(c,LAMBDA(q,SUM(q))),e,BYROW(c,LAMBDA(r,SUM(r))),VSTACK(HSTACK(K2&"/"&K3,b,"Total"),HSTACK(a,c,e),HSTACK("Total",d,SUM(d))))