The Anatomy of an Excel IF Function
Part 4: Nesting Another Function within an IF Function
By John Cellini
iCellini Computer Training
Published on July 19, 2006
Before we begin, you can download the exercise file (if you haven't done so yet) for this tutorial and click on the Expenses tab. Or you can recreate the worksheet below (except for the values in the Actual Expenses column—that's where our formulas will go).
Let's take a look at the following worksheet (inspired by one of our clients):

Let's say our company does trade shows throughout the country. We have deposited $100,000 in a bank account for our expenses for the year. We have budgeted $5,000 for each one of our 20 shows. Some shows are cancelled so no expenses are entered in the Actual Expenses column for those locations (the cells are left blank). Our goal is to come in under budget at the end of the year.
Our objective is to keep a running balance of our expenses. Each time an expense is entered in the Actual Expenses column, we want the balance to be calculated automatically. If no expense is entered, then we want the corresponding cell in the Balance column to remain blank.
First, we are going to name cell G2. Click in cell G2 to select it. Now click on the Insert menu, point to Name, and then click on Define to open the Define Name dialog box:

In the Define Name dialog box, type deposit in the text box at the top and then click add. Click OK. We can now refer to cell G2 by its name, "deposit."
page 1 | 2 | 3 | next page >>
Top of Page