Microsoft Excel βIF Functionβ is categorized as Logical Function and provides output as per the logical conditions provided. Function returns the value if logical function is βTrueβ or βFalseβ. IF function is quite often used function in Microsoft excel and helps to determine the decisions.
IF function is very advantageous for the users who uses logical conditions to determine the action plans for the problem statement. if you are working on the large database then it makes very difficult to get the logical output one by one, and only βIF functionβ helps to apply the conditions to complete database at once and save time and efforts with maximum accuracy
βIF functionβ is used in multiple areas, whenever any selection is to be made from two options βIF function can be usedβ. Like it can be used as follows:
β Selection of any item (i.e. if price of any item is less than $100 then decision should be βBUYβ else βDO NOT BUYβ)
β Acceptance of proposals (i.e. if any project cost is greater than $1000 then output should be βDO NOT ACCEPTβ else βACCEPTβ)
β Head or Tail (if Head comes then show βI WONβ else βI LOSEβ)
β Likewise, whenever there is two option and need to make choices then IF function can be used
Syntax:
=IF(logical_test,[value_if_true],[value_if_false]
]Syntax Description:
logical_test,Β argument is used to provide the logical conditions, like if A is equals to (A=), if A is greater than (A>) or less then (A<) etc.
[value_if_true],Β argument is output argument and provides result in-case statement or logical condition is TRUE
[value_if_false],Β argument is also output argument and provides result in-case statement or logical condition is NOT TRUE
We need to ensure that the logical conditions that we are providing are as per our requirement and are correct. Incorrect providing of logical conditions will leads to incorrect output and wrong decisions.
For example, if we need to purchase items which are less than (<) $100 however conditions are provides as greater than (>) $100 then it will lead to incorrect results and decision making.
Example 1: Selection of items (Buying Decisions)
We have a list of products and need to make the buying decision. We want to make decision that, if price of the product is less than $100 then output should be βBUYβ or if price of product is greater than $100 then output should be βDO NOT BUYβ. We will be following below syntax:
Syntax:Β =IF(B2<100,"BUY","DO NOT BUY")
Example 2: Acceptance of proposals
Suppose there is a list of projects cost available with you and you need to make choices that, if project cost is greater than $1000 then βDO NOT ACCEPTβ else βACCEPTβ the project. Syntax of the said condition will be:
Syntax: =IF(B2>1000,"DO NOT ACCEPT","ACCEPT")
Example 3: Head or Tail
Imagine you played game and you would win only if βHeadβ comes. You have the database available that how many times Head or Tail did come. In this case you can simply get to know how many times you won by following below IF conditions:
Syntax: =IF(B2="HEAD","I WON", "I LOSE")
Hope you liked. Happy Learning.
Donβt forget to leave your valuable comments!
View two worksheets Side-by-Side in Excel lets you view multiple worksheets at once in layouts like vertical, horizontal, tiled, or cascade, so you donβt have to keep switching between sheets. You can also split a…
You must have faced a condition when your data cells contain extra spaces, leading spaces or trailing spaces and you wanted to remove these extra spaces to standardize the data. So here you may use…
In this post, you’ll learn how to Show formulas in Excel spreadsheets. Usually, when you create a formula in Excel, it shows the result in the cell. But sometimes, you might want to see the…
COUNT function is used to get the total count of Number values in range or list.COUNT Function has one required and optional arguments.
SUM Function in Excel Excel is a mathematical spreadsheet where you can perform multiple calculations with the help of Excel Formulas. These are automated formulas which refreshes automatically once you refresh your data in a…
COUNTIFS function is used to get the total count for number of times the various criteria across ranges are met.