
This formula would also return "investigate" but this time, it is because the value in cell B3 is greater than 5%. Let's take a look at one more example that involves ranges of percentages.īased on the spreadsheet above, we would have the following formula in cell D2: =IF(OR(B2>=5%,B2=5%,B3<=-5%),"investigate","") In the examples above, only one of the conditions within the OR function must be TRUE for the condition to be met. This comes in very handy in Excel formulas.īased on the spreadsheet above, you can combine the IF function with the AND function as follows: =IF(AND(A2="Anderson",B2>80), "MVP", "regular") When using the AND function, all conditions within the AND function must be TRUE for the condition to be met. The IF function can be combined with the AND function to allow you to test for multiple conditions. You can combine the IF function with other logical functions such as AND, OR, etc.


Quite often, you will need to specify more complex conditions when writing your formula in Excel. Result: 12 Combining the IF function with Other Logical Functions

Let's explore how to use the IF function as a worksheet function in Microsoft Excel.īased on the Excel spreadsheet above, the following IF examples would return: =IF(B2=20, 12, 0)
