Nested IF statements used to be my go-to whenever I needed to juggle multiple conditions in Excel. However, just because they get the job done doesn’t mean they’re the best tool for the job. Wrestling with endless parentheses and trying to keep track of which IF controls which outcome feels about as tedious as just checking the numbers yourself. And if you try revisiting the formula a week later, good luck remembering why you set it up that way.
That’s why I stopped stacking IFs like Jenga blocks and started using the IFS and LET functions in Excel. Combine the two, and what used to look like code becomes a clear set of instructions that you can actually maintain, share, and explain without frustration.
Nested IFs are terrible, but IFS is better
From house of cards to a simple checklist
When you only need two outcomes, the IF function is fine. But the moment you start stacking conditions (if this, then that, otherwise if this, then that), you’re building a house of cards. At first, it works. But if you’ve spent any time with real-world business spreadsheets, you know how quickly it turns into a blur:
=IF(B2>100, "Excellent", IF(B2>80, "Good", IF(B2>60, "Average", IF(B2>40, "Poor", IF(B2>20, "Very Poor", IF(B2>=0, "Terrible"))))))
Technically, Microsoft lets you nest up to 64 IFs. But if you’re anywhere near that limit, I don’t know how you’re maintaining your sanity. And I say that because the pain points add up fast.
First, try revisiting a deeply nested IF formula six months later and making sense of it. Good luck finding the right spot to add another condition without accidentally breaking the entire chain. If you then miss a parenthesis, you’ll spend the next hour hunting down the error.
Fortunately, Microsoft introduced the IFS function to address many of these issues. Available in Office 2019 and Microsoft 365 subscriptions, IFS can take the place of multiple nested IF statements in Excel and is much easier to read. Here’s how our scoring formula example looks with IFS instead:
=IFS(B2>100, "Excellent", B2>80, "Good", B2>60, "Average", B2>40, "Poor", B2>20, "Very Poor", B2>=0, "Terrible")
The IFS function works by testing conditions in order: test1, value-if-true; test2, value-if-true; and so on, with as many tests as you need (up to 127). In plain English, you’re basically saying, “If the score is over 100, Excellent; if it’s over 80, Good; if it’s over 60, Average…”
IFS is a big step up from nested IFs, but it’s not perfect. You still have to repeat any complex calculation inside every condition. That’s where LET comes in, and it turns IFS from good to great.
LET is the cleaner way to write complex logic
The secret to writing Excel formulas you can actually maintain
With LET, you can name a complex calculation, perform it once, and then reference that name throughout your formula. That makes your logic more efficient and much easier to follow. Here’s how LET can further simplify our scoring formula with an IFS function:
=LET(score,B2,IFS(score>100,"Excellent",score>80,"Good",score>60,"Average",score>40,"Poor",score>20,"Very Poor",score>=0, "Terrible"))
The difference is so obvious, as you can immediately tell what score means, and you’re not stuck hunting through cell references. And while this is a simple case, it barely scratches the surface of what LET can do.
LET supports up to 126 variables, which means you can break down even the most complex logic into manageable chunks. It also improves performance. Normally, if you repeat the same expression several times, Excel recalculates it each time. With LET, you calculate it once, give it a name, and reuse it wherever you need it.
Here’s a more complex example that shows the real power of combining LET and IFS. Imagine you’re calculating commission rates based on sales performance, territory, and tenure:
=LET(sales,B2, territory,C2, tenure, D2, base_rate,0.05, sales_bonus,IFS(sales>50000,0.02,sales>25000,0.01,sales>=0, 0), territory_bonus,IFS(territory="Premium",0.015,territory="Standard",0.01,TRUE,0.005), tenure_bonus,IFS(tenure>5,0.01,tenure>2,0.005,TRUE,0), total_rate,base_rate+sales_bonus+territory_bonus+tenure_bonus, total_rate*sales)
This formula calculates an employee’s total commission by combining base rate, sales bonus, territory bonus, and tenure bonus.
The general syntax for LET is LET(name1, value1, name2, value2, …, calculation), and you can see that structure applied in this example. Each variable is defined at the top—sales, territory, tenure, base rate, and the three bonuses—before being combined into a final total rate. Every piece of the formula is labeled and easy to follow, instead of being buried inside a tangle of repeated logic.
A formula like this would be absolutely brutal to write and maintain with nested IFs. With LET and IFS, every component is clearly defined and easy to adjust. If you need to change the premium territory bonus, you just update one line. Without LET, you’d have to hunt through the entire formula, find every instance, and fix each one manually.
At the end of the day, you’d have a formula that’s easier to maintain and far less likely to break when you revisit it months later.
Your future self will thank you
Nested IFs will always have a place in Excel, but that doesn’t mean they should be your first choice every time. IFS and LET give you a way to write formulas that are clearer, faster, and much easier to maintain. Instead of wrestling with parentheses or trying to decode your own logic months later, you’ll be working with formulas that read almost like instructions. That means fewer errors, easier collaboration, and less frustration all around.
Switch to IFS and LET now, and the you who has to revisit that spreadsheet will be very glad you did.