Logic function

How to use IFS in Excel

Returns the value for the first test that is TRUE.

Syntax

IFS(logical_test1, value_if_true1, …)
logical_test1A test, like F6>=100
value_if_true1What to return when it’s TRUE

Example

Here’s IFS on a small table of orders. The highlighted cells are the ones the formula reads.

G2
fx
=IFS(F6>=100,"Large",F6>=50,"Medium",TRUE,"Small")
A
B
C
D
E
F
1
Order
Region
Rep
Units
Price
Revenue
2
1001
East
Maya
4
12
48
3
1002
West
Omar
2
30
60
4
1003
East
Lena
7
12
84
5
1004
North
Maya
1
45
45
6
1005
West
Lena
5
30
150
7
1006
East
Omar
3
18
54
8
1007
North
Lena
6
12
72
9
1008
West
Maya
8
18
144
LargeResult of =IFS(F6>=100,"Large",F6>=50,"Medium",TRUE,"Small")

Edit this formula live Change the ranges and watch the answer update. Free, no sign-up.

Common mistakes with IFS

Add a catch-all

If no condition is true, IFS returns #N/A. End with TRUE,"Other" to cover everything else.

Order matters

IFS returns the first true condition, so test the biggest threshold first: >=100 before >=50.

What the error messages mean

Type these slips into Gridwise and this is the feedback you get:

Leaving off the closing bracket

=IFS(F6>=100,"Large",F6>=50,"Medium",TRUE,"Small"

Parentheses don’t match. You have 1 opening and 0 closing parentheses. Every ( needs a ).

Text without quotes

=IFS(F6>=100,Large,F6>=50,"Medium",TRUE,"Small")

Text needs quotes. Large isn’t a function or a cell, so Excel can’t read it. If you mean the word, write "Large" with quotes.

Questions

What does the IFS function do in Excel?

Returns the value for the first test that is TRUE. The syntax is IFS(logical_test1, value_if_true1, …).

Why is my IFS formula giving the wrong answer?

Add a catch-all: If no condition is true, IFS returns #N/A. End with TRUE,"Other" to cover everything else. Order matters: IFS returns the first true condition, so test the biggest threshold first: >=100 before >=50.

Does IFS work in Google Sheets?

Most Excel functions, including the core ones on this page, work the same way in Google Sheets. A few newer functions arrived in Sheets later or behave slightly differently, so test it on your own data.

Related functions