If the given condition is met, the cell will be filled with the value given as the second argument. In other cases, the cell will be filled with the value given as the third argument.
Value if true,
Value if false)
|1||Logical test||The condition that is checked to be True or False.|
|2||Value if True||The output that will be returned by Excel if the logical test is True.|
|3||Value if False||The output that will be returned by Excel if the logical test is False.|
If the score of a student is higher than 60, the function returns the value for True, which is ‘Pass’. If the value is lower than 60 or equal to 60, it will return the value for False, which is ‘Fail’.
Certainly the best way to understand what a condition is and how they can be useful is by looking at some examples.
What type of conditions are there?
The most often used way of creating conditions is by combining any sort of data (numbers, text, dates, etc) with a comparison operator. For example:
5 < 6, 5 is indeed less than 6, so
10 < 8, 10 is not less than 8, it is greater than 8, so this is
"Textual data1" = "Textual data2", the two texts are not the same, therefore the statement is
1-1-2000 <> 2-1-2000, the dates are unequal, which is exactly what the operator says, so the statement is
Here’s an overview of the operators you can use to form conditions:
|<>||NOT equal to|
|>=||Greater than or equal to|
|<=||Less than or equal to|
However, conditions do not have to be from comparison operators, there are other functions that evaluate to
False that can be used as a condition. For example:
=IF(ISBLANK(A1), "A1 is blank", "A1 is not blank")
You can see this one in action down at the examples.
Yes they can. The second and third argument of an if function can, in turn, be if functions themselves. And if the result is True or False, even the first argument can be an if function. You can see an example of this in our Complete Guide on If.
You probably did not fill in the second or third argument of the function. Add arguments two and three.
This means that the formula name was not recognized. It was probably misspelled. Make sure the function name is spelled correctly and try again.