Syntex : "=IF(Condition,TRUE,FALSE)"
The Excel IF() checks to see if a certain condition is true or false. If the condition is satisfied then it returns true, else retun false.
The IF() we are using in this tutorial will asks if the value in column A is greater than the value in column B. If the condition get true then it will show value as "A is larger" in column D. If it is not, the IF function will place the statement "B is larger" in column D.
Add some value to Cell A1 and Cell B1 and write following formula in Cell D1.
=IF(A1 > B1,"A is larger","B is larger")
Note: There are two text statements "A is larger" and "B is larger" are in quotations. In order to add text to an Excel IF Function, it must be in quotation marks.
How to write Multiple IF function ?
From above example, if we want to check for 3 different value, we have to use multiple if function... Let's C how can we do it.
example with value :
Cell A1 =5
Place formula at Cell B1
=IF(A1=5,"Five",IF(A1=10,"Ten","Unknown Value"))
In above examples we check for the value in Cell A1, If it contains value 5 then in Cell B1 you will get "Five", in case if you now change value in Cell A1 to 10 then In Cell B1 it will automatically reflect as "Ten" and other this two value will show "Unknown Value".
As I told you IF check for the Condition and work accordingly, when we have wrote "=IF(A1=5," is the condition check point TRUE="Five", FALSE = IF(A1=10,"Ten","Unknown Value"). when we have written again IF condition in the IF that means it again going to check for condition and will return to parent function either TRUE or FALSE.
No comments:
Post a Comment
Your feedback is always appreciated. I will try to reply to your queries as soon as time allows.Please don't spam,spam comments will be deleted upon reviews.