IFS and IFS
✅ Excel Guide: IF and IFS Functions
1️⃣ IF Function
๐ What is IF?
The IF
function checks whether a condition is true or false and returns different values based on the result.
๐ Syntax:
๐งฉ Parameters:
Argument Description logical_test
The condition you want to test (e.g., A1>50) value_if_true
The result if the condition is TRUE value_if_false
The result if the condition is FALSE
Argument | Description |
---|---|
logical_test | The condition you want to test (e.g., A1>50) |
value_if_true | The result if the condition is TRUE |
value_if_false | The result if the condition is FALSE |
๐งพ Example:
๐️ Data:
A (Marks) 85 45 70
A (Marks) |
---|
85 |
45 |
70 |
๐ฏ Goal:
Label students as "Pass" if marks are ≥ 50, else "Fail".
✅ Formula: =IF(A2>=50, "Pass", "Fail")
๐ค Result:
-
For 85 → Pass
-
For 45 → Fail
-
For 70 → Pass
For 85 → Pass
For 45 → Fail
For 70 → Pass
๐ช Step-by-Step:
-
Click on the cell where you want the result.
-
Type =IF(
.
-
Enter the condition (e.g., A2>=50
).
-
Enter the value for TRUE (e.g., "Pass"
).
-
Enter the value for FALSE (e.g., "Fail"
).
-
Close with a bracket and press Enter.
Click on the cell where you want the result.
Type =IF(
.
Enter the condition (e.g., A2>=50
).
Enter the value for TRUE (e.g., "Pass"
).
Enter the value for FALSE (e.g., "Fail"
).
Close with a bracket and press Enter.
2️⃣ IFS Function
๐ What is IFS?
The IFS
function checks multiple conditions and returns a value for the first TRUE condition.
๐ Syntax:
๐งฉ Parameters:
-
condition1
, condition2
...: Logical tests.
-
value1
, value2
...: The result returned when the corresponding condition is true.
condition1
, condition2
...: Logical tests.
value1
, value2
...: The result returned when the corresponding condition is true.
๐งพ Example:
๐️ Data:
A (Marks) 85 45 70 30
A (Marks) |
---|
85 |
45 |
70 |
30 |
๐ฏ Goal:
Categorize students as follows:
-
80+ → "Distinction"
-
50–79 → "Pass"
-
Below 50 → "Fail"
✅ Formula:
๐ค Result:
-
85 → Distinction
-
45 → Fail
-
70 → Pass
-
30 → Fail
85 → Distinction
45 → Fail
70 → Pass
30 → Fail
๐ช Step-by-Step:
-
Select the cell to insert the formula.
-
Type =IFS(
.
-
Enter first condition (A2>=80
) and result ("Distinction"
).
-
Enter second condition (A2>=50
) and result ("Pass"
).
-
Enter third condition (A2<50
) and result ("Fail"
).
-
Close the formula and press Enter.
Select the cell to insert the formula.
Type =IFS(
.
Enter first condition (A2>=80
) and result ("Distinction"
).
Enter second condition (A2>=50
) and result ("Pass"
).
Enter third condition (A2<50
) and result ("Fail"
).
Close the formula and press Enter.
๐ Tips:
-
IF
is best for simple true/false tests.
-
IFS
is ideal for multiple conditions — it’s cleaner than nesting many IFs.
-
IFS
doesn’t require value_if_false
, but it will return #N/A if no conditions are true.
-
If using Excel versions before 2016, IFS
may not be available; use nested IFs
instead.
IF
is best for simple true/false tests.
IFS
is ideal for multiple conditions — it’s cleaner than nesting many IFs.
IFS
doesn’t require value_if_false
, but it will return #N/A if no conditions are true.
If using Excel versions before 2016, IFS
may not be available; use nested IFs
instead.