ShareYourGroupShareYourGroupExcel Formulas

Logical functions

IFS function in Excel

IFS checks several conditions in order and returns the result for the first one that is true.

IFS replaces a chain of IFs nested inside each other. Where a nested IF ends in a tail of closing brackets, IFS is a flat list: condition, result, condition, result. It is available in Excel 2019, Excel 2021 and Microsoft 365.

Syntax

=IFS(logical_test1, value_if_true1, [logical_test2, value_if_true2], ...)
ArgumentWhat it is
logical_test1The first condition to check.
value_if_true1What to return if the first condition is true.
logical_test2, value_if_true2, ...More pairs of condition and result, checked in order.

Examples

Each result below is what Excel itself showed for the formula on the sample sheet.

Sample sheet: Marks of eight students in three subjects. One Science mark is missing (cell D6 is empty).
ABCDE
1NameClassMathsScienceEnglish
2Asha8A788591
3Ravi8B455260
4Meena8A928879
5Kabir8B334138
6Tara8A6772
7Joy8B889084
8Neha8A546158
9Imran8B787369
Sample sheet: A small price list with item codes. The table is sorted by code.
ABCDE
1CodeItemCategoryPriceStock
2A101Basmati Rice 5 kgGrocery65040
3A102Toor Dal 1 kgGrocery16075
4B201NotebookStationery60300
5B202Ball PenStationery100
6C301LED BulbElectronics110200
7C302Power BankElectronics129918
8D401Steel BottleHome45055

How it works

IFS reads its pairs from left to right. As soon as a condition is true, it returns the result that follows and stops. Later pairs are never looked at.

That makes the order important. With rising boundaries, test the highest first. If the first example started with C2>=33,"D", every student who passed would get a D, because that condition is true for all of them and nothing after it would be reached.

The catch-all at the end

A nested IF has a final "otherwise". IFS does not. If no condition is true, the result is the error #N/A, as the third example shows. The usual cure is to make the last condition the word TRUE, which is always true, followed by the default result:

=IFS(C2>=90,"A", C2>=75,"B", TRUE,"Other")

Always add it, unless an error for an unexpected value is what you want.

IFS compared with nested IF

The same grading written both ways:

IFS has no brackets to count. Its weakness is compatibility: Excel 2016 and earlier show #NAME?. If the file must open on old versions, stay with nested IF.

When a table is better

Five or six boundaries typed into a formula are hard to change, and they are hidden from the person reading the sheet. If the bands may change, such as tax slabs or grade boundaries set by a board, keep them in a small table and look the answer up with VLOOKUP or XLOOKUP in approximate mode. The formula then never needs editing.

Common mistakes

In Google Sheets

Google Sheets has IFS with the same behaviour.

Related functions

Every result on this page was calculated in Microsoft Excel (version 16.0, build 20326) on 12 November 2026, not typed by hand.

This is an independent help site. It is not connected with or approved by Microsoft. Excel and Microsoft 365 are trademarks of Microsoft Corporation, named here only to say which program a formula is for. The people and figures in the sample sheets are made up.