SheetsLessons
Logical function

IFS function in Google Sheets

IFS tests a list of conditions in order and returns the value paired with the first one that's TRUE. It replaces long chains of nested IFs for grades, tiers and brackets.

Syntax

=IFS(condition1, value1, [condition2, value2, ...])
condition1
The first test.
value1
Returned if condition1 is TRUE.
condition2, value2, ...
Optional. More test/result pairs, checked in order.

Practice IFS

Task 1 of 2

Assign a letter grade in C2: 90+ → A, 80–89 → B, 70–79 → C, anything lower → F.

C2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

IFS examples

Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.

ABCD
1StudentClassScorePassed
2PriyaA92TRUE
3LeoB67FALSE
4ChloeA48FALSE
5MateoB81TRUE
6InesCFALSE
7KaiC75TRUE
Test scores (Ines missed the test)
FormulaResultWhat it shows
=IFS(C2>=90,"A", C2>=80,"B", C2>=70,"C", TRUE,"F")APriya scores 92.
=IFS(C3>=90,"A", C3>=80,"B", C3>=70,"C", TRUE,"F")FLeo falls through to the TRUE catch-all.
=IFS(C3>=90,"A", C3>=80,"B")#N/ANo condition matches and there is no catch-all, so the result is #N/A.

Tips and common mistakes

  • Order matters. Test the strictest condition first, or every score ≥ 70 would get a "C".
  • End with TRUE, value as a catch-all "otherwise".

Related functions