r/AskReddit 1d ago

What’s a skill almost everyone thinks they’re good at until they meet someone who’s actually great at it?

10.3k Upvotes

5.2k comments sorted by

View all comments

Show parent comments

123

u/V1per41 21h ago

Index match was great before xlookup became a thing. Only thing I really use index for now is index filter

33

u/droans 19h ago

If you need multiple columns, Index-Xmatch is much more efficient because you can place the Xmatch into a helper column and reference it multiple times.

12

u/gsfgf 18h ago

I feel like you shouldn't be using excel at that point.

31

u/musthavesoundeffects 18h ago

If I stopped every time I told myself that I wouldn’t have learned so much visual basic.

Anyway half the reason you have to figure it out in excel is because you aren’t the primary user of the workbook.

1

u/gsfgf 17h ago

I also came of age with whichever version of excel for Mac didn’t have vba.

2

u/droans 17h ago

Just for returning multiple values? Not really.

Even beyond that, I'm generally not going to write a Python script or use PQ/PBI unless the situation actually warrants it.

A common example for what I mentioned above would be data validation, such as comparing two tables which should contain identical data. There's no point in adding yet another thing that will need validating.

Back when I was an accountant, I had a lot of JEs that would use formulas like that. There's no other system except manually inputting the entry into the ERP.

Returning data from multiple columns is just a pretty basic use case.

3

u/CaveMacEoin 13h ago

Or use the let function to assign the index to a temporary variable and use that repeatedly and not use a helper column.

1

u/droans 9h ago

You can't reference a variable in a LET function outside of the formula. Unless you're saying to store it with the name manager which is basically the same thing as using a helper cell but slightly slower.

1

u/CaveMacEoin 2h ago

That's entirely unrelated to the problem you stated.

=Let(temp, xmatch("search",A:A),hstack(index(B:B,temp),index(D:D,temp)))

11

u/charonill 18h ago

Depends on the size and complexity of the dataset you need to do the lookup. Xlookup is syntactically and operationally very easy to use, but it incurrs quite the computational overhead. I think in testing it requires something like double the computation time as index/match. For a couple thousand lines, the time difference is negligible. But once you get into multiple tens of thousands of lines, with multiple lookups, or worse, multi-variable boolean lookups, index/match becomes much more attractive just to keep your workbook from chugging after every click.

5

u/InsipidCelebrity 17h ago

If I'm doing something that big and need to stay in Excel, that's when I use power query and just tell people to "hit the refresh button, no, not the Essbase refresh button, the other one."

1

u/charonill 8h ago

I think there is still a bit of an area where index/match is noticeably faster than xlookup, but still not big or complex enough to jump into power query.

5

u/autovonbismarck 18h ago

Index Match is for really big data sets. It stops looking once it "matches".

Xlookup can REALLY slow down a big sheet because it evaluates ALL cases, even if it finds the result in the 1st cell.

5

u/Ok_Hornet_714 20h ago

how do you use index filter?

4

u/V1per41 18h ago

Works to do things like pick the nth item in a list. Use filter() to get an array of all of the items that match your criteria, and then use index to select the nth item.

1

u/nonstopflux 15h ago

Still works well for xlookup with column headers.

1

u/Gasparde 13h ago

I'm pretty sure I've seen very intricate and elaborate videos demonstrating how xlookup is actually the least performant option between it, vlookup and index/match - not that you would ever notice the difference unless you were constantly dealing with Excels with 10m rows though, for any normal person xlookup should be the go to in 11 out of 10 situations.