In Excel: use =IFS(test1, result1, test2, result2, …) — it tests conditions in order and returns the first result that matches, with no nesting.
Syntax
Arguments
| Argument | 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.
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. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “ifs function”. Start on a copy or a tiny sample, keep the affected formula visible, and compare the result with the tool above before you touch the real workbook. 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. The point is a layout choice that keeps the sheet readable and sortable, but the practical win is that someone else can open the file and understand what happened without asking you.
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. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. The short version of “ifs function”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.
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
This is also commonly searched as “excel formula ifs function” and “how to use ifs function in excel”. They describe the identical operation, so you are in the right place no matter how you phrased it.
This guide also answers
- ifs formula in excel
Why do people search for this in so many different ways?
Because the same task has many names. “excel formula ifs function”, “how to use ifs function in excel” all point at the one operation explained on this page, which is why they all lead here.