

IF B2 is greater than 10, then output a different value. Here, I am saying that if A2 is greater than 10, output a value, but if not, then perform another IF comparison. If all of them are, then the true value will be displayed.

In this case, each value from A2 to A4 will be tested to see if it’s greater than 10. It’s as simple as using the colon like shown above, A2:A4. For example, if all the numbers in a range of cells is greater than 10, output True, otherwise False. So far we’ve only been working with one value in the logical comparison, but let’s say we want to work with a group of cells. For example, you can use functions like SUM, MAX, MIN, etc.

#If then formula in excel with text free#
Note that you can basically use most functions in Excel inside of a IF statement, so feel free to run loose. These functions can be really convenient when writing IF formulas. You can use ISTEXT and ISNUMBER for the other two types of data. Let’s look at more stuff you can do! Let’s say you wanted to do an IF statement based on the type of value stored in a cell (number, text, or blank). In the same light, you can also use a value from another sheet in the logical comparison too, i.e. That’s pretty easy! So you can easily reference values from other sheets if you like. What if you want to return the value of a cell on a different sheet? Well, you can do something like this:įor the true value, I am going to return the value of cell A1 on Sheet 2. What about if you want to return a value other than text or a calculated number. If you want to do an OR, simply replace the AND above with the word OR. You can add three or four or more comparison arguments if you like. They all have to be true in order for “Yes” to be displayed. The AND function basically takes multiple comparison arguments (A2 > 10) and does an AND on them. Here’s something new! If we want A2 > 10 AND B2 > 10, then we have to use the AND function inside the IF function. What if we wanted to output Yes if both A2 and B2 are greater than 10? Here we are saying that if the value of A2 is greater than 10, then multiple B2 by 10, otherwise multiple B2 by 5 and output that value into cell C2. You can also use the value of other cells too in the formula. In this example, if the value in A2 is greater than 10, it will output the value times 2, otherwise it will multiply the value by 5. Pretty straight-forward eh? Now let’s say we wanted to output numbers instead of text. Here we are saying that if the value of A2 times 10 is greater than 10, then output Yes, otherwise output No. For example, you can do this if you like: In the comparison section, you can also do math too. Now let’s see some more stuff you can do. If you don’t, it will think you are trying to refer to a named range in Excel. To output text for the true or false value, you have to use double quotes. You don’t have to put a set of parenthesis around the actual comparison, but it’s very good practice, especially when the comparison becomes more complicated.Ģ.
