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:

IF(logical_test, value_if_true, value_if_false)

๐Ÿงฉ Parameters:

ArgumentDescription
logical_testThe condition you want to test (e.g., A1>50)
value_if_trueThe result if the condition is TRUE
value_if_falseThe result if the condition is FALSE

๐Ÿงพ Example:

๐Ÿ—‚️ Data:

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


๐Ÿชœ Step-by-Step:

  1. Click on the cell where you want the result.

  2. Type =IF(.

  3. Enter the condition (e.g., A2>=50).

  4. Enter the value for TRUE (e.g., "Pass").

  5. Enter the value for FALSE (e.g., "Fail").

  6. 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: 

IFS(condition1, value1, [condition2, value2], ...)

๐Ÿงฉ Parameters:

  • condition1, condition2...: Logical tests.

  • value1, value2...: The result returned when the corresponding condition is true.


๐Ÿงพ Example:

๐Ÿ—‚️ Data:

A (Marks)
85
45
70
30

๐ŸŽฏ Goal:

Categorize students as follows:

  • 80+ → "Distinction"

  • 50–79 → "Pass"

  • Below 50 → "Fail"

✅ Formula: 

=IFS(A2>=80, "Distinction", A2>=50, "Pass", A2<50, "Fail")

๐Ÿ“ค Result:

  • 85 → Distinction

  • 45 → Fail

  • 70 → Pass

  • 30 → Fail


๐Ÿชœ Step-by-Step:

  1. Select the cell to insert the formula.

  2. Type =IFS(.

  3. Enter first condition (A2>=80) and result ("Distinction").

  4. Enter second condition (A2>=50) and result ("Pass").

  5. Enter third condition (A2<50) and result ("Fail").

  6. 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.