IF statement in excel


IF statement (Function) has the syntax if(logical text, value if true, value if false)

As any other logical statement if tests if a given condition is met and then assigns the a given value if the condition is met and a different value if the condition is not met.

A good example wood be if a student has reached a given pass mark or not as a logical test. The the value if true would be passed and if not true would be failed.


Have an excel worksheet with some values as shown below

click a cell where we want our results of the test to be and type = followed by if and then a opening bracket as shown below.

if statement 2
if function 2

Then click the cell containing the data that we want to test then the greater than sign “>” then “50” then put a comma(,) followed by the string “Passed” followed by another comma(,) then the string “Failed”

Close the brackets and enter for your formula to take effect.

if statement 3
if function 3

Auto fill your formula in the other cells below


if statement 4
if function 4

NOTE: A string must be inside opening and closing quotes

We can now move to other tutorials

visual basic

ms excel

secondary chemistry


Leave a Reply

Your email address will not be published. Required fields are marked *