0
0
ExcelHow-ToBeginner ยท 3 min read

How to Use IFS in Excel: Simple Guide with Examples

Use the IFS function in Excel to test multiple conditions in order and return a value for the first true condition. The syntax is =IFS(condition1, value1, condition2, value2, ...), where each condition is checked one by one until one is true.
๐Ÿ“

Syntax

The IFS function checks multiple conditions and returns a value for the first condition that is true.

  • condition1, condition2, ...: These are the logical tests you want to check.
  • value1, value2, ...: These are the results returned when the corresponding condition is true.

You can add up to 127 condition-value pairs.

excel
=IFS(condition1, value1, condition2, value2, ...)
๐Ÿ’ป

Example

This example shows how to assign grades based on a score using IFS. It checks the score and returns the correct grade.

excel
=IFS(A2>=90, "A", A2>=80, "B", A2>=70, "C", A2>=60, "D", TRUE, "F")
Output
If A2 is 85, the output is "B"
โš ๏ธ

Common Pitfalls

Common mistakes when using IFS include:

  • Not including a final TRUE condition to catch all other cases, which can cause errors if no conditions are met.
  • Using overlapping conditions that cause unexpected results because IFS stops at the first true condition.
  • Forgetting to match each condition with a value, which leads to formula errors.
excel
=IFS(A2>90, "A", A2>80)  <em>(Wrong: missing value for second condition)</em>

=IFS(A2>90, "A", A2>80, "B", TRUE, "F")  <em>(Right: all conditions have values and a catch-all TRUE)</em>
๐Ÿ“Š

Quick Reference

PartDescription
condition1First logical test to check
value1Result if condition1 is TRUE
condition2Second logical test if condition1 is FALSE
value2Result if condition2 is TRUE
TRUEOptional catch-all condition for any other case
valueResult for catch-all condition
โœ…

Key Takeaways

Use IFS to test multiple conditions without nested IFs for cleaner formulas.
Always include a final TRUE condition to handle unexpected cases.
Each condition must have a matching value to avoid errors.
IFS stops checking after the first TRUE condition, so order matters.
Use IFS for clear, readable conditional logic in Excel.