How to Use IF Function in Excel
You can learn here, what IF function is and how to use it.
IF Function Basics
IF function is one which are used the most often in Excel. IF is a logical function. But you can not only check TRUE / FALSE values.
IF Function contains from 3 parts:
- Logical test – IF function checks if this test is true or false in the cell
- Value if true – IF function puts this value if logical test is true
- Value if false – IF function puts this value if logical test is false
How does the IF function work?
The IF function operates by assessing the provided condition (logical test). If the condition is met (true), it returns the “Value if True”; if not (false), it returns the “Value if False.” This fundamental structure allows you to create dynamic and conditional formulas in Excel.
Pass/Fail Evaluation
Consider a scenario where you have a table of exam results, and you want Excel to determine if a student passed or failed the exam automatically.
You can use the IF function for this purpose. Here’s the formula:
=IF($C3>50,”PASSED”,”FAILED”)
In this formula:
- $C3 represents the student’s score.
- The logical test checks if the score is greater than 50.
- If the score is greater than 50, Excel displays “PASSED”; otherwise, it shows “FAILED.”
Grading System
Now, let’s tackle a more complex scenario where you want to assign grades to students based on their scores.
The grading criteria are as follows:
- A: >90 points
- B: >75 points
- C: >60 points
- D: >50 points
- E: ≤50 points
You can use nested IF functions to achieve this. Here’s the formula:
=IF($C3>90,”A”,IF($C3>75,”B”,IF($C3>60,”C”,IF($C3>50,”D”,”E”))))
This formula checks multiple logical tests sequentially to determine the appropriate grade for the student based on their score.
Leave a Reply