1. Home
  2. Functions
  3. Logical
  4. IFS

IFS function

Checks conditions in order and returns the value of the first one that is TRUE.

Syntax

=IFS(logical_test1, value_if_true1, ...)

Arguments

ArgumentRequiredDescription
logical_test1RequiredThe first condition
value_if_true1RequiredThe result when it is TRUE

How to use IFS

IFS takes 2 required arguments, and accepts more values in the same pattern. Type =IFS( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=IFS(1>2, "a", 2>1, "b")Result "b"
=IFS(FALSE, 1)Result #N/A

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.