IF Function Explained in Excel – How to Use

IF Function in Excel

Explanation

If Function is most useful functions in Excel. This function test a condition of “TRUE” (criteria met) or “FALSE” (criteria not met). For example, =IF (A1>33, “Pass”, “Fail”), i.e. if the value of cell “A1” is greater than 33 then result would be “Pass” otherwise “Fail”.
 
This function evaluates values, texts or date format also. IF Function works only for “TRUE” and “FALSE” and for more conditions, use Nested IF function.

IF Function works on the following logical operators:-

IF Function

Syntax

=IF(logical_test, [value_if_true], [value_if_false])

Arguments

Logical_Test – Logical _test is a criteria or condition, if the criteria or the condition is met with cell value, like if cell “A1>70”, or “A1=70”, or “A1<70”.

Value_if_true – [optional] If the above-given criteria met then it will produce the result as TRUE. i.e. condition met, for example, the student is “Pass” if cell value A1 is greater than 33 =IF(A1>33,“Pass”,”Fail”).

Value_if_false – [optional] If the given criteria are not met then it will produce the result as FALSE. i.e. condition is not met.  for example, the student is “Failed” if cell value A1 is less than 33 =IF(A1>33,“Pass”,“Failed”).

Example 1value_if_true – [optional]

IF Function

In this image 2nd option omitted, we can see where the criteria are not met “0” is appearing in that cell. Leave this cell blank and write the formula as =IF(A11>20,”Approve”,”) by putting (“”) for blank output.

Example 2value_if_false [Optional]IF Function

In this image, we have omitted 1st argument i.e. TRUE by putting simple “,” in the space provided or we can leave it blank also by putting (” “) into the space provided.

Example 3

IF Function

To understand IF Function better, see above image. Here we have a name, score list and result in the columns.

If somebody has scored “above or equal to 33” he will “Pass” and if somebody could not get marks at least “33” he is “Fail”.

Example 3IF Function

If a salesman achieves the target then he will get the incentive and if he fails to achieve that then he will not.
 
If an employee makes a sale “above or equal to 100000”, he will get “7 %” incentive of total sale he made and if anybody could not achieve the target he would get only “4%” incentive of the sale he made.

Useful Notes

  • We can set TRUE/FALSE condition as “Pass” or “Fail”, “Agree” or “Disagree”, “Yes” or “No”, “if the target met”,or “Not met target” etc.
  • IF function get only one value from two conditions TRUE/FALSE and cannot get both value at the same time.
  • IF function produces #Name error if the arguments are not typed correctly or invalid.

So I hope I have explained this function in brief and if after this having any doubt or question in mind please feel free to share.

 

Regards

Narendra

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.