ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Computers & Software»
  • Computer Software»
  • Office Software Suites»
  • Microsoft Office

Using Simple IF Function In Microsoft Office Excel 2003

Updated on September 6, 2017
Patkay profile image

Patrick is a dedicated technology writer who wishes to make the world better by informing individuals who seek more knowledge.

Using Simple IF Function In Microsoft Office Excel 2003

Use IF function to Grade or Test

The IF function is a tool used to test specified condition in a given cell in a spreadsheet. It is a logical test used to test if a condition is true or false. If the condition being tested is true, expected results are displayed and again if the condition is false, a different kind of result is displayed.

After testing the condition of a given cell, the required action is carried out. This action could be executing of a formula or entering of text on the given cell where the results are expected.

We use the IF condition in our day today lives only that we do not think about it. When you say that if you get money at the end of the month you will buy a new laptop, you are using an IF condition. The condition here is if you get money and the action is buying a laptop.

The IF Function

IF Function, Statement, or Condition

The IF function, statement, or condition as it is sometimes referred to, is a very important function we have in Excel. It is available in all versions of Microsoft Office Excel and the procedure of working with it is the same to all versions.

A good scenario case where you can apply it is when you are grading exam results, for instance, that of fifty students. It can make your work very easy for what you need is to only come up with one IF statement and then you auto-fill to the rest of the cells. In this case, you do not have to keep on checking results of the students one at a time to determine the grade.

Syntax and Parts of the IF Function

How Does it Look Like?

This is how the IF function looks like. =IF(logical_test, value_if_true, value_if_false)

  • Logical_test - is any value or expression that can be tested to see if it is TRUE or FALSE. For example, A10>90 is a logical expression; if the value in cell A10 is greater than 90, the expression evaluates to TRUE. Otherwise, if it is less than 90, the results are displayed as FALSE.
  • Value_if_true - this is the value that is displayed if logical_test is true.
  • Value_if_false - this is the value that is displayed if logical_test is false.

If Function Question

An exercise requiring the use of IF function
An exercise requiring the use of IF function | Source

An Example of IF Function Question

An Example of IF Condition

Suppose we are to find the grades of these students using the if function given that:-

  • If the total >=90 grade is "A"
  • If the total >=80 grade is "B"
  • If the total >=70 grade is "C"
  • If the total <60 grade is "D"

And their status given that:-

  • If grade = A, status then is EXELLENT
  • If grade = B, status then is WELLDONE
  • If grade = C, status then is GOOD
  • If grade = D, status then is FAIL

Using IF Function

How to use the IF function
How to use the IF function | Source

How to Use the IF Function

How to Use the IF Function

  1. You must have the data you are testing already typed in your worksheet. You can copy the example I have here for your use.
  2. Click on where you want to have your answer.
  3. At this stage, you can type the IF directly on the cell or you use the IF function wizard. You should try both to see which works best for you.

Typing the IF function

  • Click on where the answer will appear and press the equals sign on your keyboard.
  • Enter the IF statement as follows without spacing or omitting anything: =IF(B2>=90,"A",IF(B2>=80,"B",IF(B2>=70,"C",IF(B2<70,"D"))))

Using the IF dialog box

  • Click on where the answer will appear, then go to the insert function and select the IF function and click okay
  • Input the logical test, B2>=90
  • Input the value if true, what will be displayed "A"
  • Input the value if false - IF(B2>=80,"B",IF(B2>=70,"C",IF(B2<70,"D"))) click okay to get your results.

Using the IF Function

Setting the IF condition
Setting the IF condition | Source

Important to Note About IF Condition


  • Number arguments are not quoted =IF(B2>=90,"A",IF(B2>=80,"B",IF(B2>=70,"C",IF(B2<70,"D"))))
  • Text arguments are quoted - =IF(F2="A","EXCELENT",IF(F2="B","WELLDONE",IF(F2="C","GOOD","FAIL")))
  • To know how many brackets to use for closing, count the number of IFs you have
  • You do not have to type the last IF, you can just use a comma and give the expected results
  • When you make simple mistakes, Excel suggests the correct answer for you

Excel Auto-correction

The autocorrect option
The autocorrect option | Source

About IF Condition

Did you Knew how to use the IF Condition prior to reading this?

See results

© 2012 Patrick Kamau


    0 of 8192 characters used
    Post Comment

    • Patkay profile image

      Patrick Kamau 5 years ago from Nairobi, Kenya

      Hi, thanks a lot njeri p for reading and commenting. I am glad you liked the article. Hope you will read more of my work.

    • profile image

      njeri p 5 years ago

      good work my teacher