In Excel: use =IFS(test1, result1, test2, result2, …) — it tests conditions in order and returns the first result that matches, with no nesting.
On this page8
Syntax
Arguments
| Argument | required / optional | Description |
|---|---|---|
logical_test1 | required | The first condition to test. |
value1 | required | What to return when the first condition is TRUE. |
logical_test2, value2 | optional | Further condition-and-result pairs, tested in order. |
Related functions
List your conditions on paper in the order they should be tested — most specific or highest threshold first.
Type =IFS( and enter the first condition, a comma, then its result.
Continue with further condition-and-result pairs separated by commas.
Finish with TRUE and a default value so unmatched rows do not return #N/A.
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
IFS replaces a chain of nested IFs with a flat list of condition-and-result pairs. It evaluates them top to bottom and returns the first match, which makes ORDER the thing to get right: a test of >50 placed before >100 catches everything above 50 and the later test never fires. There is no built-in "otherwise" branch, so the standard idiom for a default is a final pair of TRUE and the fallback value. When nothing matches and no default is supplied, the result is #N/A. Requires Excel 2019 or later. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. For “ifs formula in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected formula change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.
A worked example
Grading a score in B2: =IFS(B2>=90,"A", B2>=80,"B", B2>=70,"C", TRUE,"F") — note the thresholds run highest first, and the final TRUE catches everything else. Written as nested IFs the same logic needs four opening brackets and four closing ones, which is where the errors come from. IFS removes the bracket-counting that makes deep nested IFs the most error-prone construct in spreadsheets. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.
In Google Sheets
Some functions on this page are newer additions to Excel: they are in current Microsoft 365 and Excel for the web, while older perpetual Excel versions return #NAME?. Google Sheets maintains its own function list, so confirm each function exists there before relying on the same formula. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. Treat “ifs formula in excel” as a small building block rather than a chore. Once the inputs sit in their own cells and the formula reads from them, the same setup answers a dozen related questions with a tweak, and Excel keeps every dependent figure current as the data changes. The tool above is there so you can rehearse and verify before committing anything to a real workbook; the steps and worked example are there so the logic sticks. Get it right once and it stops costing you time — it starts saving it, every time the question comes back around.
Common mistakes
- Ordering the conditions loosest-first, so a broad test catches rows a later specific one was meant to handle.
- Omitting the final TRUE default, which returns
#N/Afor anything unmatched. - Using it in Excel 2016 or earlier, where it returns
#NAME?.
Frequently asked questions
How do I add an "else" to IFS?
Make the last pair TRUE and your default value: =IFS(…, TRUE, "Other").
Does the order of conditions matter?
Yes, decisively. IFS returns the first match, so put the most restrictive test first.
What is the difference between IFS and SWITCH?
IFS evaluates arbitrary conditions; SWITCH compares one expression against a list of exact values. Ranges need IFS, exact matches suit SWITCH.
Other ways people ask this
People reach this page typing “excel formula ifs” and “how to use ifs in excel”, among other phrasings; whichever wording you used, the fix above is the one you want.
Why do people search for this in so many different ways?
Because the same task has many names. “excel formula ifs”, “how to use ifs in excel” all point at the one operation explained on this page, which is why they all lead here.