FormulaCraft

IF vs IFS: simplifying nested conditions in Excel and Sheets

Heads up: Excel and Google Sheets do this differently.

Excel
=IF(A2="High","Priority 1",IF(A2="Medium","Priority 2","Priority 3"))
Google Sheets
=IFS(A2="High","Priority 1",A2="Medium","Priority 2",TRUE,"Priority 3")

Verified example

Computed by a real spreadsheet engine on the sample data below.

Priority LabelResult
HighPriority 1
MediumPriority 2
LowPriority 3
HighPriority 1
MediumPriority 2

=IF(A2="High","Priority 1",IF(A2="Medium","Priority 2","Priority 3"))Priority 1

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Select the cell where you want the result and type = to begin your formula.
  2. 2For IF: type IF(logical_test, value_if_true, value_if_false) — nest another IF in the false argument for each additional branch.
  3. 3For IFS (Excel 2019+/Google Sheets): type IFS(condition1, result1, condition2, result2, TRUE, default) — the TRUE at the end acts as the catch-all else clause.
  4. 4Press Enter and copy the formula down to apply it to all rows.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

Does IFS exist in all versions of Excel?

IFS was introduced in Excel 2019 and Excel 365. Users on Excel 2016 or earlier must use nested IF instead.

How many conditions can IFS handle?

IFS supports up to 127 condition-result pairs in Excel and Google Sheets.

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: