IF cell B2 does not equal “Y”, then place 0 in cell D2.Īs you can see in this example, the IF logical condition is either TRUE or FALSE. IF cell B2 equals “Y”, then use the Rate value from cell C2 ($3.00) in D2. Using the example above, you might express the logic in the following way: These examples are noted by labels and in the screen snap below. If the chore wasn’t completed (FALSE situation), nothing would be added. If the chores were completed (TRUE situation), a value would be applied toward the allowance. Setting Up the IF FunctionĪlthough Excel can’t issue an allowance, it can calculate the amount using a logic test based on whether a cell met a formula condition.įor example, I could create a spreadsheet with the chores needed to get an allowance.
#If then formula full
IF you empty the garbage AND mow the lawn AND wash the dishes AND walk the dog, you get your full allowance.Īnd since I grew up in New England, this logic would change with the seasons to account for leaves and snow. The value Excel will put in a cell if the test fails.ĭespite not having Microsoft Excel, my parents routinely employed this type of IF logic when calculating my allowance. The value Excel will put in a cell if the test is true. For example, at the bottom left of the dialog, a line reads “ Formula result =.” Pin Blank IF function dialog with empty Formula result The IF Function Arguments FieldĪ test on a cell value that is either TRUE or FALSE. This is the easiest way to learn an Excel formula because you can see if it returns your expected result. The wizard-like dialog allows you to fill 3 Function Arguments or data elements, but you could use the formula bar once you master it. You might think of it as a formula building block and you can find it in the Logical category. What’s appealing about the function is it can be used with other functions to create more complex formulas. It can fill cell items for you based on evaluating a condition such as a cell’s content and logical operators. The IF function is one of the simplest and most useful Excel logic functions.