EXCELlent Ones Consulting Skip to Content Skip to Search

Print  |   | Download PDF

IF Statement

The “IF” statement is the basis for many interactive spreadsheets. It is often used to create financial models and building scenarios dynamically. Below we have a list of accounting entries. In the accounting world every entry must “balance”, the total of the debits and credits must equal zero. If the total of the accounting entry does not equal zero then the entry is “unbalanced” and must be corrected. As we add additional lines to this entry we would like to keep track whether this entry is in “balance” or “unbalanced”. Let’s employ the “IF” statement for this.

1. In cell D1 lets type in =IF(SUM(B:B)=0,"Balance","Unbalance")

a. This section of the formula is the logical test part of the formula. Here we are testing to see if the total in column B equals zero.

b. This section determines the output if the logical test is true. In this case if the total in column B equals zero then display “Balance”.

c. This section determines the output if the logical test is false. In this case if the total in column B does not equal zero then display “Unbalance”.

2. Here we see that the entry as it stands right now is out of “Unbalanced”.

3. When we add another line to the entry we see the text displayed by the formula has changed to “Balance”.

The “IF” statement is a very powerful function. It is the building block of many dynamic spreadsheets. It can be used to save you countless hours evaluating the contents of a spreadsheet.


Footer

Email: info@excellentones.com | P.O. Box 160493 | Brooklyn, NY 11216 | Phone: (347) 763-1035 | Fax: (718) 228-7859

All rights reserved. Copyright 2014 Excellent Ones Consulting LLC.