IF Function!!
Dear Paul
Thank you for attending Excel 07 intermediate course. I hope you enjoyed the course and have started to put the new topics into practice!!
If function is a logical function which returns a value if the statement is TRUE and returns a different value if it is FALSE.
A typical situation where If Function can be used is to calculate commission for salespeople based on their Total sales for a specific period.
Another typical example could be that if you have minimum budget for particular costs and you want to know if you are "over Budget" or "under Budget" you can use the IF function.
I believe that if you understand the syntax (Structure) of the Function then you can use it for many more situations that are specific to you either at home or at work!!
A math quiz ask the question “what is 7 X 4 equal to?” the IF function that would check to see if the answer was correct and, if so, give the student a mark would be:
=IF(A5 = 28,1,0)
Similarly, a geography quiz could ask “What is the capital of India?” An IF function that would check to see if that answer was correct and give the student 2 marks would be:
=IF(A5 = “New Delhi”,2,0)
=IF(A5 > 5000,”Too High”,” ”)
In this example, the IF function acts as a flag. If the value in cell A5 goes above 5,000, the warning “Too High” is displayed in the cell. If A5 is not above 5,000, there is no need for a warning so the cell remains blank.
Please note that 5000 doesn’t contain a , (comma) because If function uses the , to separate the three sections. Excel will return an error stating that too many arguments were entered.
The syntax of IF function is as follows:
=IF(Logical Test,TRUE,FALSE)
Logical test is the specific criteria that should be met. e.g. If B7>20000 or B7 = “Temp”
Please note that if you are typing the If statement manually without using the If function dialog box you have to enter any text value in “ “ (Inverted comas or speech marks).
TRUE is the Value (text , Number or Calculation) that needs to be returned it the criteria is met
FALSE is the Value (text , Number or Calculation) that needs to be returned it the criteria is NOT met
I hope this has answered your query.
If this has answered your query then I would request you to please mark the question as resolved!! If not and you have a specific question related to this then please post it as a new question and we should be able to provide you the solution for it!!
Kindest Regards
Rajeev Rawat
MOS Master Instructor 2000 and 2003