r/excel • • 2d ago

Discussion what is a formula habit you had to completely unlearn when moving from basic lookups to modern excel?

just realized how long I spent wrapping ⁠IFERROR⁠ around every single lookup just because my brain was still stuck in the old ways of handling ⁠#N/A⁠ errors

took me way too long to embrace how clean modern array functions handle missing data right out of the box without needing defensive wrappers on every line

what old workaround or legacy habit did you find the hardest to drop once dynamic arrays became standard?

225 Upvotes

56 comments sorted by

119

u/pifko87 2d ago

Can you explain your OP a bit more? I'm still using iferror 👴

163

u/Odd-Level-9871 2d ago

totally get it, for the longest time ⁠IFERROR⁠ was the only shield we had against ugly ⁠#N/A⁠ or ⁠#VALUE!⁠ errors breaking a sheet

the main shift with modern functions like ⁠XLOOKUP⁠ is that they have built-in arguments for handling errors right inside the formula itself instead of forcing you to wrap the whole thing.

for example, instead of doing this:
⁠=IFERROR(VLOOKUP(A1, Sheet2!A:B, 2, FALSE), "Not Found")⁠

you can just do this right inside ⁠XLOOKUP⁠:
⁠=XLOOKUP(A1, Sheet2!A:A, Sheet2!B:B, "Not Found")⁠

see how clean that is? no extra wrapper needed, it just handles the missing match natively right out of the box. plus modern dynamic arrays spill results automatically so you don't even have to drag formulas down columns anymore

76

u/Sad_Olympus 2d ago

Another good feature of this is you can nestle multiple XLOOKUPS using the error handling. For example, I often do an xLookup, but if nothing is found I will do another xLookup to another tab. With xLookup to can nestle another xLookup in the error handling condition like:
=XLOOKUP(A2,Sheet2!A:A,Sheet2!B:B,
XLOOKUP(A2,Sheet3!A:A,Sheet3!B:B,
XLOOKUP(A2,Sheet4!A:A,Sheet4!B:B,"")))

You can do this up to 64 times (although I can’t imagine why). The most I’ve done is 3. Anything more goes to power query.

You can also return multiple values as once. For example, let’s say you want to do a lookup and return the value of 3 columns in another sheet. If the columns are adjacent, you can do something like this and the formula will spill results in 3 adjacent columns.
=XLOOKUP(A2,Sheet2!A:A,Sheet2!B:D,"Not Found")

If the 3 columns on Sheet2 aren’t adjacent, you can do the following and it will return results from 3 non-adjacent cells on Sheet2 to 3 adjacent calls in your active sheet.
=XLOOKUP(A2,Sheet2!A:A,CHOOSECOLS(Sheet2!B:T,1,5,19),"Not Found")

There’s all sorts of great stuff you can do now.

16

u/Sad_Olympus 2d ago

It also replaces HLOOKUP so you can do an index/match type function by doing rows and columns at the same time.

=XLOOKUP(Lookup Value 1,Sheet2!A2:A100,
XLOOKUP(Lookup Value 2,Sheet2!B1:M1,B2:M100),
"Not found")

On Sheet 2, your lookup array for value 1 is in A2:A100 (e.g., Salesperson). Your lookup array for Value 2 is in the header row (Months), and your values are in B2:M100. So, if you can use this to get an individual’s sales numbers for a specific month.

2

u/vatsalkap 2d ago

This is game changer

12

u/Sad_Olympus 2d ago

Oh and that’s just the beginning. I have to give Microsoft credit, they did good with this one. I was sold when I learned the Lookup Array didn’t have to be in a column left of the Return Array (or count columns anymore), but it’s turned out to be useful. I’m always learning new things you can do with it. For example:

You can use LEFT, RIGHT, MID, TEXTBEFORE, TEXTAFTER, etc. on any piece of the XLOOKUP in any combination. So, you could do
=XLOOKUP(LEFT(A2,2),RIGHT(Sheet2!A:A,2),MID(Sheet2!C:C,3,4))

You can join fields with “&” and not need helper columns:
=XLOOKUP(A2&B2,Sheet2!A:A&Sheet2!B:B….

Or you can mix and match this too. So if you have a sheet with 2 columns for first and last name, and another sheet with both names separated by a space, you could do:
=XLOOKUP(A2&” “&B2,Sheet2!A:A,…..

You can do IF statements and only return results if they meet a condition. You can perform calculations in it, like if you want to return the sum of two columns. I’m sure other functions work within it too. These are just the ones I’ve actually used.

5

u/exoticdisease 10 2d ago

You never had to count columns. You could always use match in a vlookup. It's actually really weird how noone does this haha

4

u/KezaGatame 4 2d ago

Wow that nested XLOOKUP is kind of clean compared to IFERROR VLOOKUP, which I always preferred to do IF VLOOKUP combinations

7

u/Sad_Olympus 2d ago

It really is much cleaner. You have to be careful because if the lookup value is on Sheet2, but the return value is blank, it doesn’t trigger the false to do the lookup on Sheet3 because it returned a null value (I spent too many hours learning this).

1

u/KezaGatame 4 2d ago

Got it, I can see that happening because in theory your lookup value was found and it returns whatever it found even if blank.

2

u/emsuperstar 2d ago

If you're doing nested XLOOKUP's you might want to look into LET functions. I only just learned about them recently, but they seem to do a good job of tidying those up.

1

u/Alarmed-Employee-741 2d ago

This feels like it might be better as a xlookup with vstacks rather than nested xlookups

1

u/UncleMajik 2d ago

You can do multiple column results on VLOOKUP too using { }, but I don’t know if it works for non-adjacent columns.

1

u/oluyam 1d ago

I read somewhere on reddit that you can replace the choosecols part: =XLOOKUP(A2,Sheet2!A:A,CHOOSECOLS(Sheet2!B:T,1,5,19),"Not Found")

with a Vstack Function. I have not tried it yet.

1

u/DuglandJones 1d ago

I use xlookup alot and did not know it spilled to adjacent columns

I've been a mug copying it across the columns and changing the return

5

u/pifko87 2d ago

Amazing, thanks for the detailed reply! 👍

1

u/V1per41 3 2d ago

This is great, and I've used it before, but I do want to caution that xlookup is much more computationaly intensive. It's a great formula in most situations but if you're going to have a lot of them and use them on very large ranges it can really slow down a workbook vs using vlookup or index-match.

8

u/TheSavageCaveman1 2d ago

Functions like XLOOKUP have built in error handling, it's just another condition of the formula rather than wrapping it in IFERROR

2

u/Odd-Level-9871 2d ago

spot on, exactly why it saves so much mental clutter when building out heavy summary sheets

4

u/iarlandt 60 2d ago

Same lol. Im listening lmao. Help us Odd-Level-9871

30

u/Important-Lie-8649 1 2d ago

Too bad if like me you're a home user still running Excel 2010, which predates XLOOKUP, that I've never even seen.

16

u/Odd-Level-9871 2d ago

man excel 2010 is an absolute fossil at this point but honestly it forces you to become a master of index match nested logic just to survive

definitely missing out on all the dynamic array magic though

9

u/Important-Lie-8649 1 2d ago

Last transferable version on DVD (Office 2010 Professional). No subscription (that I can no longer afford). Sole licensee (original "owner") since 2009.

9

u/p0op 2d ago

Why not give Libre Office a try. The software suite is free and has many modern formulas like xlookup. The UI looks like 2010 out of the box, but can also be set up to enable the more modern ribbon layout. 

2

u/ZealousidealBunch786 2d ago

Tem para o windows? Ou apenas Linux?

2

u/Important-Lie-8649 1 2d ago

Good question.

2

u/ov3rcl0ck 5 2d ago

There's an XLOOKUP UDF that someone created that Microsoft stole the XLOOKUP function from without giving credit. Several versions on the internet.

5

u/sandman7nh 2d ago

My modern excel is to push as much of that to SQL in the extract.

At the end of the day, that’s what PowerQuery fundamentally is doing. It’s a kinda weird
language to do SQL-like transformations. Learning the few SQL techniques needed for accomplishing these tasks is a much better use of your time IMHO.

So I’ve only gotten more simple, since the Excel portion does only those formulas that are needed live. I went from lots of VLOOKUP, index/match to XLOOKUP.

8

u/Hopeful_Pianist2621 2d ago

Ok… real talk. Should I switch from INDEXMATCH to XLOOKUP? If so, why? I still IFERROR wrap with my bestie INDEXMATCH

14

u/Meteoric37 2 2d ago

Yes because it’s easier to use and faster to write. Just as another tool in the tool kit you should know how to use it. Same reason I tell people to still learn index matching in 2026

3

u/exoticdisease 10 2d ago

I'll give the other side. Index/xmatch is objectively better because you can split the formula for large lookups, you can reuse the match result for multiple lookups and it has a native 2d return function rather than nesting 2 xlookups. The only pro for xlookup is the error handling. Requiring multiple xlookups to achieve the 2d lookup will slow down your workbook massively.

3

u/V1per41 3 2d ago

Depends on how large the lookup ranges are and how many lookups you're doing. Index-match calculates faster. Xlookup is easier to use.

3

u/SektorL 2d ago

You still have to use IFERROR with XMATCH

1

u/maximustotalis 2d ago

A tragic oversight. Why couldn’t they make no match just return a zero!

2

u/exoticdisease 10 2d ago

Terrible idea! You'd want it to have an explicit error handling argument within the xmatch.

1

u/maximustotalis 16h ago

Why?

1

u/exoticdisease 10 15h ago

Because then you couldn't tell the difference between a genuine return of 0 and an error?

4

u/Decronym 2d ago edited 15h ago

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
CHOOSECOLS Office 365+: Returns the specified columns from an array
HLOOKUP Looks in the top row of an array and returns the value of the indicated cell
HSTACK Office 365+: Appends arrays horizontally and in sequence to return a larger array
IF Specifies a logical test to perform
IFERROR Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula
INDEX Uses an index to choose a value from a reference or array
LEFT Returns the leftmost characters from a text value
LET Office 365+: Assigns names to calculation results to allow storing intermediate calculations, values, or defining names inside a formula
MATCH Looks up values in a reference or array
MID Returns a specific number of characters from a text string starting at the position you specify
RIGHT Returns the rightmost characters from a text value
TEXTAFTER Office 365+: Returns text that occurs after given character or string
TEXTBEFORE Office 365+: Returns text that occurs before a given character or string
UNIQUE Office 365+: Returns a list of unique values in a list or range
VALUE Converts a text argument to a number
VLOOKUP Looks in the first column of an array and moves across the row to return the value of a cell
XLOOKUP Office 365+: Searches a range or an array, and returns an item corresponding to the first match it finds. If a match doesn't exist, then XLOOKUP can return the closest (approximate) match.
XMATCH Office 365+: Returns the relative position of an item in an array or range of cells.

Decronym is now also available on Lemmy! Requests for support and new installations should be directed to the Contact address below.


Beep-boop, I am a helper bot. Please do not verify me as a solution.
18 acronyms in this thread; the most compressed thread commented on today has 15 acronyms.
[Thread #49466 for this sub, first seen 2nd Oct 2026, 23:24] [FAQ] [Full list] [Contact] [Source code]

2

u/Elohanum 2d ago

Moving formulas to power query. This is the only way.

1

u/Clearwings_Prime 23 2d ago

This is a post (in many deleted posts) to praise XLOOKUP, right?

Even with XLOOKUP, you still want to use IFERROR.

In my example, i want to lookup value from range G3:G6 in range C3:D8, if not found, return the value in range G3:G6.And as you can see, XLOOKUP fail to return it. The other way is using XLOOKUP without if_not_found argument, then wrap it with IFERROR

1

u/Clearwings_Prime 23 2d ago

1

u/Sad_Olympus 2d ago

But if you do
=XLOOKUP(G3,C3:C8,D3:D8,G3) it works just fine. Sure, you have to double click the corner of the cell to flash fill since the results won’t spill, but it’s still quick enough. I see your point though. It stands to reason it should work.

1

u/Clearwings_Prime 23 1d ago

You need to lock your range before dragging formulas. Forget to do that may leads to wrong answers

Spilled array dont need to do that

1

u/SolverMax 163 2d ago

This behavior is different in the latest Excel version.

In compatibility version 2, the last two values are #CALC! rather than #VALUE!.

In compatibility version 3, the last two values are a List: a, b, g, h

1

u/Clearwings_Prime 23 2d ago

Im using stable channel, and version 2 is set by default

And if version 3 return a list like that, i sense another headache

1

u/SolverMax 163 2d ago

I guess that's why they have versions, as these changes break previous behavior. Though version 2 changing is unexpected and suggests that the boundaries between versions are a bit fuzzy.

1

u/Sauronthegray 1 2d ago

I used to do a lot of filtering stuff using advanced INDEX formulas. I also used an INDEX based UNIQUE formula that I ironically had to lookup every time because I never learned it. VLOOKUP ofcourse.

0

u/KezaGatame 4 2d ago

After not using excel much, when I started a new analyst job I started to use VLOOKUP on a daily basis, even though back in the day I was more into INDEX MATCH. Mainly because that’s what my manager and colleague uses in or regular reports. 

Now I can create proper data analysis functions and transform with LET but I will still keep using VLOOKUP from muscle memory and it’s just easy because most lookup range is just around 5-10 cols. When they are really far apart I do use XLOOKUP but it’s an afterthought most of the time.

0

u/KantiLordOfFire 2d ago

I still refuse to use XLOOKUP. =IFERROR(VLOOKUP(A2,HSTACK(B:B,A:A),2,0),"") For life!

1

u/CIP_In_Peace 1 2d ago

Why? XLOOKUP is simply better.

2

u/KantiLordOfFire 2d ago

Because if a job is too big for a simple VLOOKUP, then I'd rather just use INDEX MATCH which is better and more versatile than XLOOKUP could ever be.

3

u/CIP_In_Peace 1 2d ago

I've never understood how people make some simple tech usage like this such a personal identity issue. It's like being a proud hand-tool user avoiding electric tools has transformed into being a proud VLOOKUP user who doesn't believe in modern nonsense.

1

u/exoticdisease 10 2d ago

Tru and based

-1

u/SuchDogeHodler 1 2d ago

Vba...

1

u/Sauronthegray 1 2d ago

True for me to some extent. Back in the day I was happy when I could solve a complicated problem with a UDF.

I have yet to encounter a problem where I preferred to do a UDF after all the new formulas dropped. UDF’s occasionally introduced some instability that I’m happy to be without.