Logical
Excel 2019
◉ 44 views
=IFS()
The IFS function checks whether one or more conditions are met and returns a value that corresponds to the first TRUE condition. IFS will allow you to include up to 127 pairs of conditions (the test if something is True and the result if something is true). IFS can take the place of multiple nested IF statements.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019
=IFS([Something is True1, Value if True1,Something is True2,Value if True2,Something is True3,Value if True3)
Hover argument names in the table for details.
Output typeMixed
Popularity70 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =IFS() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
logical_test1 |
Logical | Required | Condition that evaluates to TRUE or FALSE. |
value_if_true1 |
Any type | Required | Result to be returned if logical_test1 evaluates to TRUE. Can be empty. |
logical_test2…logical_test127 |
Logical | Optional | Condition that evaluates to TRUE or FALSE. |
value_if_true2…value_if_true127 |
Logical | Optional | Result to be returned if logical_testN evaluates to TRUE. Each value_if_trueN corresponds with a condition logical_testN. Can be empty. |
▣ Examples
Example 1
=IFS(A2>89,"A",A2>79,"B",A2>69,"C",A2>59,"D",TRUE,"F")
Example 2
=IFS(F2=1,D2,F2=2,D3,F2=3,D4,F2=4,D5,F2=5,D6,F2=6,D7,F2=7,D8)
§ Remarks
- To specify a default result, enter TRUE for your final logical_test argument. If none of the other conditions are met, the corresponding value will be returned. In Example 1, rows 6 and 7 (with the 58 grade) demonstrate this.
- If a logical_test argument is supplied without a corresponding value_if_true, this function shows a "You've entered too few arguments for this function" error message.
- If a logical_test argument is evaluated and resolves to a value other than TRUE or FALSE, this function returns a #VALUE! error.
- If no TRUE conditions are found, this function returns #N/A error.
✦ Tips
- To specify a default result, enter TRUE for your final logical_test argument. If none of the other conditions are met, the corresponding value will be returned. In Example 1, rows 6 and 7 (with the 58 grade) demonstrate this.
- If a logical_test argument is supplied without a corresponding value_if_true, this function shows a "You've entered too few arguments for this function" error message.
⚠ Common Errors
#VALUE!
If a logical_test argument is evaluated and resolves to a value other than TRUE or FALSE, this function returns a #VALUE! error.
Fix: مطمئن شوید هر شرط منطقی نتیجه TRUE یا FALSE میدهد؛ فرمول شرط را اصلاح کنید.
#N/A
If no TRUE conditions are found, this function returns #N/A error.
Fix: Add TRUE and a default result as the last pair
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!