What is an IF statement
A calculation that uses IF-THEN-ELSE logic.
Example:
"If all philosophers are thinkers and John is
a philosopher, then John is a thinker."
Parts of the IF functions
=IF(B2=“Answer","Correct","Wrong")
Equal Sign
Function Name
Cell
Reference
value if True value if False
Operator: Can be
= , < , >, >=, <=,
Truth Value
Notice, Values are
separated by commas.
Example of If statement in Excel
A B C
The planets revolve around this. Sun =IF(B1="sun","Correct","Wrong")
A B C
The planets revolve around this. Sun Correct
Function
Output
Write the correct IF Statement
A B C
What is the President’s last name
A B C
What is the President’s last name =if
A B C
What is the President’s last name =if(b1=
A B C
What is the President’s last name =if(b1=“Obama”,
A B C
What is the President’s last name =if(b1=“Obama”, “Correct”,
A B C
What is the President’s last name =if(b1=“Obama”, “Correct”, “Incorrect”)
Write the correct IF Statement
A B C
23 35
A B C
23 35 =if
A B C
23 35 =if(b1>
A B C
23 35 =if(b1>a1,
A B C
23 35 =if(b1>a1,True,
A B C
23 35 =if(b1>a1,True,False)
Write an if statement that outputs “True” if B1 is Greater than A1