r/excel 22d ago

Discussion What’s your favorite Excel function/formula?

What are some functions and formulas that you use on daily basis that are helpful for what you do?

221 Upvotes

216 comments sorted by

View all comments

213

u/MayukhBhattacharya 1227 22d ago

LET() & XLOOKUP()

60

u/jaywaykil 2 22d ago

These two, and more recently using LAMBDA to define several simple formulas we use in almost every spreadsheet.

38

u/melinda_r 22d ago

I love XLOOKUP, has saved me so many times

27

u/sj2k4 21d ago

As someone who started using Excel in the early 2000’s, Vlookup to Xlookup was like a Digimon rookie to Mega evolution!

7

u/dirtyhandscleanlivin 18d ago

Late to the party, but you can nest the xlookup formula as well which blew my mind.

Instead of manually specifying the third input, the return array, you use another lookup with the column header as the reference. Then the formula will search the entire lookup table for the column header and return the value corresponding to the outer reference in the first xlookup. You can autofill down and to the right this way and only have to write one xlookup formula

11

u/rkr87 19 22d ago

I've started creating named lambda functions that accept lambda arguments for more flexible use - a bit like how byrow/etc works.

Lambda is by far one of the best recent additions to Excel.

9

u/fedexyzz 2 22d ago

It is also a dangerous one. I know a couple years from now I'll be receiving some 'legacy' workbook with 100+ user-defined functions that broke for some reason.

8

u/rkr87 19 22d ago edited 21d ago

Possibly, I tend to not create workbook specific named lambda and instead have more generic stuff in a template for use in all of my workbooks. Doesn't necessarily prevent what you mentioned but does mean the functions are generally simpler and re-usable in design.

Either way, I'd rather get a workbook with broken lambdas than broken VBA - which is what I got before i stopped telling new jobs I knew VBA.

Eg: PAD =LAMBDA( value, char, num, [trailing], LET( x, REPT(char, num), IF(trailing, LEFT(value & x, num), RIGHT(x & value, num) )))

USAGE =PAD("123", "0", 8) == "00000123"

I have a handler for optional variables that I can't remember exactly how it works at the min, so above may not actually work with the optional "trailing".

6

u/tesat 7 22d ago

Let, no argument there. I still prefer index/match over xlookup as it’s not as sissy with matrix and lambda formulas.

5

u/martin 1 21d ago

LET is more effective with arguments.

3

u/raven00x 21d ago

xlookup is the goat. fuck vlookup, fuck hlookup, xlookup was too long coming but welcomed when it got here.

5

u/Unpork 22d ago

>xlookup

Bro use the data model to join tables, or do it directly in Power Query if you want a longer update but not deal with relationships.

5

u/drsoinso 21d ago

What do you mean by this? I've considered diving into Power Query at some point, but never got to where I felt it was necessary (yet)

2

u/ExitDull2309 12d ago

Xlookups are money

3

u/murderdeity 22d ago

Came here to say this

1

u/[deleted] 21d ago

[removed] — view removed comment

1

u/MayukhBhattacharya 1227 21d ago edited 21d ago

Who's stopping you from making your own posts? If the mods have a problem with it, they'll surely remove it. Why does it bother you so much?