Notice that the first argument pair tests to see if the value in cell A2 is less than the value in E2, which is $250. Then we could go even further and replace the same arguments within the new ‘IF’ functions and create more possible outcomes. Then our formula would have four possible outcomes. This could expand further to even split out the ‘value_if_false’ argument to some more granular test. Now there are three possible outcomes to our formula rather than just two. So, in this case, our ‘value_if_true’ for the first ‘IF’ functions becomes an ‘IF’ function that tests the same cell for whether it is greater than 250 or not. You can use this tool to step through all kinds of formulas.Nesting ‘IF’ functions is especially useful when another ‘IF’ logical needs to be addressed as the result of the outcome of either the ‘value_if_true’ or ‘value_if_false’ arguments.įor example, if we look to our previous example with the ‘200’ threshold as our logical test, we might want to take the formula a step further and test the values to isolate any that would be above ‘250’. Download the Excel file and choose one of the IF formulas explained on this page. On the Formulas tab, in the Formula Auditing group, click Evaluate Formula. This Excel tool helps you understand a formula.Ĥ. If TRUE, the IF function returns the sum of Data2, if FALSE, the IF function returns 0.Ĭonfused? You can always use the Evaluate Formula tool to step through your IF formula. The sky is the limit!Įxplanation: the AND function returns TRUE if the input value is greater than 100 and the average of the values in the named range Data1 is greater than 100, else it returns FALSE. You can combine IF with AVERAGE, SUM and other Excel functions. If TRUE, the IF function returns Yes, if FALSE, the IF function returns No.Ģ. For example, use IF and AND to test if a value is between two numbers.Įxplanation: the AND function returns TRUE if the person is older than 12 and younger than 20, else it returns FALSE. Let's take a look at a few more cool examples.ġ. For example, take a look at the nested IF formula in cell C2 below.Įxplanation: if the score is less than 60, the nested IF formula returns F, if the score is greater than or equal to 60 and less than 70, the formula returns D, if the score is greater than or equal to 70 and less than 80, the formula returns C, if the score is greater than or equal to 80 and less than 90, the formula returns B, else it returns A. If you have Excel 2016 or later, simply use the IFS function.Ģ. For example, take a look at the nested IF formula in cell C2 below.Įxplanation: if the score equals 1, the nested IF formula returns Bad, if the score equals 2, the nested IF formula returns Good, if the score equals 3, the nested IF formula returns Excellent, else it returns Not Valid. The FALSE value is being replaced by another IF function to make a further test.ġ. The IF function in Excel can be nested, when you have multiple conditions to meet. If TRUE, the IF function reduces the price by 50%, if FALSE, the IF function reduces the price by 10%. The AND function returns TRUE if Product equals "Table" and Color equals "Green" or "Blue". For example, take a look at the IF function in cell D2 below.Įxplanation: the AND function above has two arguments separated by a comma (Table, Green or Blue). If TRUE, the IF function returns Pass, if FALSE, the IF function returns Fail.ģ. For example, take a look at the IF function in cell D2 below.Įxplanation: the OR function returns TRUE if at least one score is greater than or equal to 60, else it returns FALSE. If TRUE, the IF function returns Pass, if FALSE, the IF function returns Fail.Ģ. For example, take a look at the IF function in cell D2 below.Įxplanation: the AND function returns TRUE if the first score is greater than or equal to 60 and the second score is greater than or equal to 90, else it returns FALSE. Use the IF function in combination with the AND function and the OR function and become an Excel expert.ġ. You can use the IF function to display an empty string if the end value hasn't been entered yet (see row 5).Įxplanation: if the end value is not empty ( means not equal to), the IF function calculates the progress between the start and end value, else it displays an empty string (two double quotes with nothing in between). The formula below calculates the progress between two points in time.ģb. Always enclose text in double quotation marks.ģa. Note: you can use the following comparison operators: = (equal to), > (greater than), = (greater than or equal to), (not equal to).Ģ. The following IF function produces the exact same result. Explanation: if the price is greater than 500, the IF function returns High, else it returns Low.ġb.