Beruflich Dokumente
Kultur Dokumente
Excel IF Function
Writing the function
Nested IF Functions
IF with AND
IF with OR
Questions
Excel IF Function
Syntax
=IF(
Now, we'll add our arguments. The arguments will tell the IF function what to look for and what to write in the cell
depending on the outcome.
The first argument sets up the condition we want to test. For this formula, we want to know if the value in cell xx is
greater than or equal to 50. We'll use some mathematical operators ( > for greater than and = for equals ) to write the
condition:
=IF(xx>=50
The next argument will tell the function what to write if the condition is true (that is, if the value is greater than or equal
to 50). This means the person will be passes, so we'll have it write Passed. Because this argument is text, we'll need to
put it in double quotes (" "). And, as with any function, we'll need to use a comma to separate each argument:
=IF(G2>=50, “Passed"
The final argument will tell the function what to write if the condition is false. This means the person will Failed., so go
ahead and close the parentheses:
OK, you're done! When you press Enter, the words Passed/Failed should appear in the cell.
Writing the function
Let’s understand this using an example.
Suppose you have the results from a test where a score above 50 is
classified as “passed”, less than 50 classified as “failed”. You can do
this easily by using an Excel IF function:
Excel 2003 can nest up to 7 IF Functions, and Excel 2007, 2010 and
2013 allow 64 nested IF Functions.
Nested IF Functions
Using nested IF functions is to assign grades to students.
A -> 85 or above
B -> between 70 and 84
C -> between 60 and 69
D -> between 50 and 59
F -> below 50
For the AND Function, formulas in multiple cells are tested and only
if all of these formulas are true will the function returns a TRUE
response. If not, the function returns FALSE as a value.