Summary

Every workbook I inherit seems to have one formula nobody wants to touch, and it’s almost always a nested IF. By the third condition, the formula bar ends in a row of closing parentheses, and adding a fourth means rebuilding it by hand. Excel has offered cleaner options for years, much like the older functions I’ve already swapped for better replacements. IFS handles ranges, SWITCH handles fixed values, and LET stops a formula from repeating itself. I built a small support ticket tracker to put all three to work, and LET is the one I’d push hardest. IFS checks every condition in order No more counting closing parentheses My tracker holds 15 support tickets, and each one needs a priority based on how long it’s been open. Tickets open for 48 hours or more are Critical, 24 or more are High, 8 or more are Medium, and everything else is Low. Here’s the nested IF version in cell D2. =IF(C2>=48,“Critical”,IF(C2>=24,“High”,IF(C2>=8,“Medium”,“Low”))) It works, but every new tier means opening another IF and adding another closing parenthesis at the end. The IFS function lists each condition next to its result, in the order Excel should check them. =IFS(C2>=48,“Critical”,C2>=24,“High”,C2>=8,“Medium”,TRUE,“Low”) Both columns return identical results for all 15 tickets, with two landing in Critical. The difference shows up when the team wants an Urgent tier at 72 hours. In IFS, that’s one more pair at the front of the formula, and nothing else moves. It’s the same reason IFS sits near the top of the conditional functions I use to make my sheets smarter. IFS has one catch. It has no built-in fallback, so when no condition is true, it returns A. I deleted the final TRUE pair to test this, and the 3-hour Northwind Bakery ticket showed A right away. That last TRUE argument acts as the “everything else” result. Order matters too, since IFS stops at the first condition that’s true. SWITCH matches one cell against many values Plan names in, SLA targets out Each customer is on one of three plans, and each plan comes with a response target, or SLA (service-level agreement). Enterprise tickets need an answer within 4 hours, Pro within 12, and Basic within 24. The nested IF version repeats the same comparison against cell C2 three times. =IF(C2=“Enterprise”,4,IF(C2=“Pro”,12,IF(C2=“Basic”,24,“Check plan”))) SWITCH names the cell once and then lists each value with its result. The final argument has no value paired with it, so Excel returns it whenever nothing matches. =SWITCH(C2,“Enterprise”,4,“Pro”,12,“Basic”,24,“Check plan”) Plan names, region codes, and status labels are fixed values, and that’s exactly the job SWITCH is built for. Adding a Starter plan later means adding one value and one result, and the rest of the formula stays untouched. I covered why SWITCH beats nested IF for fixed lists in more depth earlier, so I’ll keep this section short. The limit is that SWITCH only looks for exact matches. It can’t test whether a ticket has been open for more than 24 hours, so priority stays with IFS. LET stops formulas repeating the same math Name a calculation once, reuse it everywhere The last column ties everything together. For each ticket, I want to know whether it has breached its SLA, is at risk, or is on track. All of that depends on one number, the SLA hours minus the hours open. Without LET, the formula writes that subtraction four times. =IFS(E2-D2<0,“Breached by “&ABS(E2-D2)&” hrs”,E2-D2⇐4,“At risk (“&E2-D2&” hrs left)“,TRUE,“On track”) LET lets me name the calculation once and use that name everywhere else. I called it left, as in hours left. =LET(left,E2-D2,IFS(left<0,“Breached by “&ABS(left)&” hrs”,left⇐4,“At risk (“&left&” hrs left)“,TRUE,“On track”)) Both columns agree on all 15 tickets. Seven have breached their SLA, four are at risk, and four are on track. The real gain is maintenance. If the team adds a one-hour grace period, I edit one spot instead of four. Microsoft also notes that LET calculates a repeated expression once, which adds up on large sheets. The catch is compatibility. LET needs Excel 2021 or Microsoft 365, while IFS and SWITCH need Excel 2019 or later, so anyone on an older version sees errors. When a LET formula starts showing up in several workbooks, I’d prefer turning it into my own named function with LAMBDA. Start with your messiest IF formula One rewrite makes the next one easier Plain IF is still the right tool for a single yes-or-no test. Once a formula stacks three or more conditions, though, one of these three almost always reads better. IFS fits ranges, SWITCH fits fixed labels, and LET keeps repeated math in one place. Next, I plan to convert the tracker into an Excel table so new tickets automatically pick up all three formulas, then color breached rows with conditional formatting. If you have a workbook with a nested IF that nobody dares to edit, that’s the best place to try your first rewrite. Excel logo Microsoft’s spreadsheet app for budgets, trackers, and data analysis. IFS and SWITCH work in Excel 2019 and later, while LET needs Excel 2021 or Microsoft 365.

By Yasir Mahmood

Original Article