In Excel, the function of IF does a logical comparison of two numbers. The IF function returns either False or True as a result. We may, for instance, see if the value in cell B2 is larger than the one in cell A2. If this is the case, the result is TRUE; otherwise, it would be FALSE. The objective of the IF function is to check for a given condition.
This IF function is a built-in function in Excel that is classified as one of the Logical Functions. It may be used in Excel as one of the spreadsheet functions (WS). The IF function may be used as an element of a formula in cell of the sheet as a worksheet function.
The IF Function and Its Applications
In Excel, an IF function is made up of three parts:
- A logical test, utilizing an operator sign for logical comparison;
- If the logical test returns TRUE, then the value is returned.
- If the logical test returns FALSE, then the value is returned.
For instance, we own a grocery store and maintain a list of available items. We need to make a new order with the distributor if the amount in stock falls below 20. This is when the IF function comes in handy. If the quantity of a particular item is less than 20 (TRUE), we must place an order. We don’t have to do anything if the quantity is 20 or higher (FALSE). Check out some Excel training videos to have a better grasp.
IF Function – Nested
An IF statement in Excel can be used as a TRUE or FALSE value within another IF function. This allows you to test for several conditions within a single function and deliver multiple outcomes. It’s risky to use nested IF functions. Within one formula, a spreadsheet developer may layer up to 64 IF expressions! As a result, it’s easy to see how the overview may become highly muddled and complicated. IF functions can be nested to test several conditions. To expand the logical test, use the IF function with logical functions such as AND & OR.
AND function
You may use this IF function in association with AND function to test for several criteria. For the condition to be satisfied whilst working with the AND function, all requirements in the AND function should be TRUE. It is particularly useful in formulae of Excel.
OR function
You may use the IF function in combination with this OR function to test for several criteria. In this situation, however, just one or many of the OR function’s requirements must be stated TRUE for the requirement to be fulfilled.
