CHAPTER 2
Dates and Timing
Consider a world without time and how that would impact a financial analysis. It would greatly limit the methodologies we could use to value a company and simultaneously limit the value that could be derived for the firm. At the most extreme level, all we would have would be the current financial statements. Determining the best investment would be a relative analysis involving the highest multiple of earnings with consideration to a strong corporate structure at that given moment. Issues of revenue potential, future cost factors, operating expenditure plans, and financing strategies would not exist. In fact, most of us would be out of jobs since we get paid to project and manage the uncertainties caused by time.
A slightly more advanced level of analysis would give credit to the fact that items on the balance sheet can grow in value either by their operating potential or just by inflation. This still ignores many components of a fully operational firm. The more complex analysis that comes out of completely integrating all factors of time is a discounted cash flow methodology where we make projections of many facets of the firm’s structure and operations.
Within the complex framework of a discounted cash flow analysis, multiple time-related issues arise. Andy Warhol once said, “They say time changes things, but you actually have to change them yourself.” I rarely quote celebrities, but this epitomizes the issues we deal with in regard to time and discounted cash flow modeling. On one hand, we have to manage concepts that will naturally change over time, such as straight-line depreciation of an asset; on the other hand, we have the ability to change assumptions that affect how the concept changes over time. In the case of depreciation, we can change the useful life of assets that determine the depreciation amounts. These changing time-based variables are true for many of the topics in corporate valuation modeling.

THE NEED FOR A FLEXIBLE SYSTEM

Not only do dates and timing affect multiple parts of an analysis, but they also change frequently. Every day that passes can have a new effect on the analysis. For instance, our model could use the current stock price and shares outstanding to calculate the market value of equity. The stock price changes continuously throughout trading, while the shares outstanding can also change depending on corporate actions on any given day. As we push the analysis date further into the future, values of the many components of the company change: the rates from which variable-rate interest is indexed, debt amortization, asset depreciation, intangible amortization, capital expenditure plans, and so on. Therefore our modeling will require flexibility as to how we enter dates and set up timing.
FIGURE 2.1 Revenue is shown on a monthly, quarterly, semi-annual, and annual basis. Typically, models will have only one timing set for a scenario. This can be made flexible for fast customization.
011
Further complicating matters is the division of time into aggregated units. While we could attempt to model out a company on a daily basis or even more granularly on a real-time basis, the amount of data would be overwhelming. In order to rationalize the amount of data and to make the data discrete, we often group data into monthly, quarterly, semi-annual, or annual amounts. Setting such periodicity allows us to see trends and align important events that affect the company. For example, if most of the debt of a company is paying on a quarterly basis, it may be worth projecting the company’s cash flows on a quarterly basis to see how well the company can cover the periodic debt service. Figure 2.1 shows some of the common possibilities for organizing timing in a corporate model.

THE FORECAST PERIOD

Another issue that we will run into is the limit of our ability to forecast certain items. Corporate valuation using a discounted cash flow methodology is particularly challenging because we are trying to project cash flows that can have multiple uncertain factors. We are trying to capture many capricious elements such as management’s ability to adjust to changing economic and competitive conditions, market changes for unit volumes and prices, and variable capital structures and costs of financing. This is markedly different from other financial analyses, such as project finance or asset-based financings where contracts exist, which define assumptions that allow an analyst to have a clearer path to determining periodic cash flows.
Due to the increasing uncertainty of forecasted variables over time, we limit our detailed analysis to a forecast period. This forecast period is characterized by periods of frequently changing variables. For instance, if we were to take a look at an Internet company during the late 1990s, we would have expected a very high growth rate, with an eventual reduction of growth to a stable level. This period of high growth would be the forecast period. Converse to a high-growth scenario can be one of distress. An example of this is U.S. automakers, such as General Motors and Chrysler. At the end of 2008, they requested government support to stay solvent and were asked by Congress to provide projected financial statements. In their case, they would have had a forecast period that included a contraction of growth, lower price points, and perhaps increased costs until they could return to a stabilized level. The forecast period would focus on using assumptions that caused contracted growth, prices would be lower in each of the periods, and costs would be ramped up.
Forecast periods also can be determined by planned events. For instance, if a company knew it would have an aggressive capital expenditure plan, then the forecast period would be focused on the periods of capital expenditure. But this forecast period for the same company can vary by perspective. For example, the bank financing the capital expenditure would focus on the term of the debt used for the financing as the forecast period. The forecast period is a limited amount of time that analyzes unusual, short-term situations for a firm.

THE TERMINAL PERIOD

If we used only a forecast period in a valuation, we would be attributing value to the company for only those years. While this could be true for some companies, many companies believe they will be in existence in perpetuity—otherwise known as a going concern. For this reason, we must estimate a value for the company in perpetuity. This is done by changing assumptions for the short-term forecast period to a long-term expectation and applying a perpetuity-based formula. Typical changes would include switching the growth rate to a stable expectation, using maintenance capital expenditure assumptions rather than specific plans, altering the short-term working capital expectations, and so on. Figure 2.2 is a graphical representation of the difference between the forecast and terminal periods. We will look at the details of calculating a terminal value in Chapter 9, but for now we should understand that there will be a distinction between the forecast period and the terminal value.

HISTORICAL TIME PERIODS

Whereas the forecast and terminal periods will be the focus of analysis, the basis for these items is often rooted in historical data. It is convenient to store this data in the financial model since we may use it for multiple reasons. Historical income statement data can give us important information such as revenue growth rates, whereas balance sheet data can show us historical capital structure ratios. Often, historical, audited annual financial statements going back at least three to five years are used for these purposes.
FIGURE 2.2 In the forecast period, short-term assumptions are used, whereas in the terminal period we will switch variables to long-term, stable assumptions.
012
Where multiple years of data is useful to calibrate performance assumptions, a thorough analysis looks at trends within a year, particularly since many companies experience cyclicality due to the nature of their business or industry. For instance, agribusinesses have revenues and costs that correspond to the harvest season of the crops that they grow and sell. For this reason, we would want to examine historical data and perhaps structure our forecast period to a level of detail that captures the cycle. Adjusting the analysis for cyclicality can help ensure that there are no periods of stressed cash flow that causes liabilities to go unpaid.
Beyond normal operational trends, we should also be concerned by performance trends caused by unusual market or idiosyncratic forces. What if the industry or region is experiencing a negative trend in performance? How has a change in management affected the company’s performance? To help flush out these details, we may look at the last 12 months (LTM) of a company’s performance in detail. Although it is common to use the LTM, do not feel trapped by convention. If management changed, or if there was a severe industry dislocation further back, it might make sense to adjust a detailed historical analysis to coincide with such events.
Besides using historical data to assist in calibrating the assumptions for our model, we will also use the most recent audited financial statements as a basis for our projections. If, for instance, we believe that the first year’s growth of a company’s forecast period is 8%, then we could take the last audited revenue figure and grow it by 8%. The process of using historical information for calibration and as a basis for projection is demonstrated by Figure 2.3.
FIGURE 2.3 The information from 12/31/2007 is hard coded, historical information, whereas data to the right is based on percentage expectations.
013

EVENT TIMING

Thus far we have discussed time on a macro level; however, date and timing issues also permeate throughout specific events within the forecast period. Such events could include debt issuance, capital expenditure, intangible acquisition, and so on. For each of these events there are specific dates and timing that initiate or terminate sub-events. For instance, assume a company anticipates purchasing a warehouse one year from the beginning of an analysis. During the first projection year there would be no capital expenditure related to this event. However, on the expected purchase date gross fixed assets would increase and either cash decreases or some other liability financing takes place. One period from the purchase of the warehouse, a depreciation calculation of some type would take place. The depreciation would continue every period until the asset is fully depreciated. At that point, the asset and its accumulated depreciation is kept on the books until it is removed by disposal. Figure 2.4 is a conceptual depiction of the event timing for a single capital expenditure. In Chapter 5 we will examine this concept further, but it is important now to realize that we must build in functionality to monitor and alter outcomes based on these sub-events.
FIGURE 2.4 Many items such as capital expenditures have specific sub-events that require the timing to be monitored.
014

MODEL BUILDER 2.1: DATES AND TIMING ON THE ASSUMPTIONS SHEET

1. This first Model Builder for dates and timing will focus on the assumptions sheet. Go to the Assumptions sheet and enter the text Dates, Timing, & Global Assumptions in cell B3. This will be a label for the relevant date and timing variables.
2. In cell B8, enter the text, Last Historical FY. FY stands for Fiscal Year. In cell D8, enter a proxy date of 12/31/2007. This will be the latest date that we have audited financial information from. For instance, the balance sheet that we will use in our analysis will be as of 12/31/2007. Also, name cell D8 inputs_LastFY.
3. In cell B9, enter the text, Current FY. In cell D9, enter a proxy date of 12/31/2008. This will be the first projection period that we will work with. Also, name cell D9 inputs_CurrentFY.
4. In cell B10, enter the text, Periodicity. We will very shortly create our first data validation list to toggle between input data. In this case, we will create a data validation list to switch the model between various periodicities. Data validation lists are explained in detail in this chapter’s Toolbox; however, we should take a moment to discuss the management of these lists. The actual values for the lists will be stored on a separate sheet that will be hidden once we complete the model. Let’s create this sheet right now by changing the name of Sheet2 to Hidden.
5. Go to the Hidden sheet and enter the text Hidden in cell A1. Still on the Hidden sheet, enter the following text in the corresponding cells:
A3: lst_Periodicity
A4: Annual
A5: Semi-Annual
A6: Quarterly
A7: Monthly
6. Name the range A4:A7 lst_Periodicity. Note that cell A3 is merely a label for the list that we have named below. Such a system, where the name of a named range is easily viewable, helps in the development and adaptation of the model.
7. In the following cells on the Hidden sheet enter the corresponding values:
B4: 12
B5: 6
B6: 3
B7: 1
8. Do not worry if you are looking at the complete model and a cell seems to be missing on the Hidden sheet. There is some functionality that we have left off the Hidden sheet, in cell B8, that we will come back to later.
9. Go back to the Assumptions sheet. In cell D10, create a data validation list using the named range lst_Periodicity. If creating data validation lists is unclear or new to you, refer to this chapter’s Toolbox at this point. Name cell D10 inputs_Periodicity and select Annual from the list as the starting value.
10. In cell B11, enter the text Months Projected. In cell D11, enter a proxy value of 60. This section will allow the user to adjust the forecast period duration. We will see later that this will also help us identify the terminal period. Name cell D11 inputs_MoProj. With this done, we have finished the core dates and timing for the Assumptions sheet. We will now take the inputs on the Assumptions sheet and put them into action on a new sheet.

MODEL BUILDER 2.2: INTRODUCING THE VECTORS SHEET

1. Change the name of Sheet3 to Vectors. You may want to move the sheet to the left so it is placed between the Assumptions and the Hidden sheets. On the Vectors sheet, in cell A1, enter the text Vectors.
2. In cell D10, enter the following formula:
=inputs _LastFY
This cell references the last historical date that we entered on the Assumptions sheet.
3. In cell E10, enter the following formula:
=inputs_CurrentFY
This cell references the current date that we entered on the Assumptions sheet. Notice that this is a rare instance where we violated the precept of keeping the same formula for each continuous row or column. In this case, we should never have to adjust these two dates since the historical date is there for a reference and column E will always contain the current date of the analysis.
4. Prior to completing the next logical cell, cell E11, we need to go back to the Hidden sheet to add some functionality. On the Hidden sheet in cell B8, enter the following formula:
=OFFSET(Hidden!$B$3,MATCH(inputs Periodicity,lst Periodicity,0),0)
This is a classic OFFSET MATCH combination of functions. The technique is described in the Toolbox section of this chapter if you are unfamiliar with either function or the pairing of the two functions together. In this case, we are offsetting the top of the list of period values on the Hidden sheet by matching the periodicity label that a user selects from the data validation list on the Assumptions sheet. For example, when a user selects Annual for the periodicity on the Assumptions sheet, then this cell will return a 12; when a user selects Monthly, this cell will return a 1. Still on the Vectors sheet, name cell B8 ctrl_Periodicity. We will need this cell momentarily since its value is the number of months between periods based on the selected periodicity from the Assumptions sheet.
5. The next cell we will work on is going to contain a much more complex formula than we have seen thus far. If any of the functions that are used are unclear or new to you, go to the Toolbox section of this chapter, where they are explained in detail. Otherwise, back on the Vectors sheet, enter the following formula in cell F10:
=IF(E10=“”,“”,IF(EDATE(inputs_CurrentFY,inputs_MoProj+12)>(EDATE (E10,ctrl_Periodicity)),EDATE(E10,ctrl_Periodicity),“”))
Let’s break up this formula section by section. The formula begins with an IF function to test whether the prior cell was blank. Double quotes (“”) are a way to check whether a cell is blank. There are other functions, but this is simple enough. The formula checks the prior cell in time to the left to see whether it is blank. If it is, then for presentation reasons, we should not have a value show up in the cell to the right. However, if there is a value in the prior cell, we may want a value in the next cell. This value is determined by first testing to see whether we are within the forecast period. The test is accomplished by checking the date of the terminal period and making sure that it is greater than the prior period’s date increased by the number of months between periods. If this test returns a TRUE, then the current date is the prior period’s date increased by the number of months between periods using the EDATE function. If it is FALSE, then the cell is kept blank using double quotes. If you are unfamiliar with the IF and/or EDATE functions, refer to the Toolbox section of this chapter for additional explanation. Otherwise, copy and paste this formula over the range F10:Z10.
Astute readers will notice that on the Assumptions page we indicated a 60-month projection period, yet a date that is 72 months from the last historical fiscal year appeared. This is because that final period is the terminal value period. Often a confusing concept, we need to have a period to enter many of our terminal value assumptions. In reality, this is not a true period such as the ones in the forecast period range, but it is necessary so we can set assumptions for the terminal value.
6. For visualization and referencing purposes, we might want to have labels indicating whether we are in the forecast period or the terminal period. To do this, enter the following formula in cell D9:
=IF(D10=inputs_CurrentFY,“Projected—->”,IF(EDATE(inputs_CurrentFY, inputs_MoProj)=D10,“TV Year”,“”))
This formula uses IF functions to test the dates in row 10 for the corresponding column in row 9. If the date in row 10 is the current fiscal year, then a label that indicates the start of the projection is returned. If the date in row 10 is equal to the current fiscal year increased by the number of months in the projection period, then a terminal period label is returned. Otherwise the cell is kept blank by entering double quotes. Copy and paste this formula over the range D9:Z9.

SUMMARY OF DATES AND TIMING

We are now done with the core dates and timing functionality. Some of the functionality that we have implemented is incomplete at this point. While it is interesting to see the dates change by using a drop-down list and hide or disappear depending on our forecast period, our goal is valuation. If we try to maintain a conceptually based flow, once we have the shell of our model created from dates and timing, we should begin to fill it in. One of the most influential factors of a firm’s valuation is the earnings ability of the company. For this reason we will implement revenue generation and the income statement in Chapter 3.

TOOLBOX

This Toolbox will cover a number of Excel tools that allow us to control user entry, anticipate variable assumptions, and automate lookups. These include:
• Data validation lists
• OFFSET function
• MATCH function
• OFFSET MATCH combination
• VLOOKUP function
• EDATE function
• EOMONTH function
• IF function

Data Validation Lists

Good financial modelers work like computer programmers by reducing error before it can enter the system they are creating. One method is to limit a model user’s possible entries. This can be achieved in a few ways, each having its own advantages and disadvantages. The first one we will explore is creating a data validation list.
When a data validation list is specified to a cell, it provides a selection of possible entries in a list format when the cell is selected. The list is based on a list that exists in a different range in the workbook. Figure 2.5 shows the results of creating a data validation list in cell D3, using data from B2:B5.
FIGURE 2.5 Data validation lists allow a user to select a value from a list of possible values that the model builder creates.
015
To create such a list in Excel 2003, go to the Data menu and select Validation. From the Validation dialogue box under the Allow label, select List. Under the Source label, put the cursor in the box and then select a range on the sheet and then press OK. An identical process can be done in Excel 2007 by going to the Data tab and pressing the Data Validation button. The Validation dialogue box should look identical to Figure 2.6.
FIGURE 2.6 The Data Validation dialogue box allows a user to designate the cell where the list will be created and the reference for the items that will be contained on the list.
016
FIGURE 2.7 Named ranges must be used in the Data Validation dialogue box if the user wants to store lists on separate sheets from the cell containing the data validation list.
017
A very important nuance of using data validation lists is that if the source list remains unnamed, then the source list must be on the same sheet as the cell that the validation list is being created in. Try to create a data validation list on Sheet1 using a source list from Sheet2. In neither Excel 2003 nor 2007 will you be able to select a different sheet for the source list. This can be easily overcome by naming the source list and then using the named range as the source. Make sure to still use an equal sign; otherwise, the name that was entered in the source list will appear in the cell! See Figure 2.7 for an example of using a named range in the source field of the Validation dialogue box.

OFFSET

Financial modelers are consistently tasked with manipulating data throughout their models. Much of this is nonmathematical, but rather more administrative. The OFFSET function is a reference function, which is incredibly useful for moving and referencing data within a model. The function requires the following parameters:
=OFFSET(reference cell, number of rows from reference cell to move up or down, number of columns from reference cell to move left or right)
FIGURE 2.8 The OFFSET function is a reference function to return values based on numerical parameters.
018
Figure 2.8 is an example with OFFSET returning a value by referencing cell A1 and offsetting it by 1 row and 2 columns. This reference returns the value from cell C2, which is 1200. When positive numbers are used for the rows, then OFFSET moves down from the reference location, while negative numbers will move up from the reference location. Similarly, when positive numbers are used for the columns, then OFFSET moves right from the reference location while negative numbers will move left from the reference location.
OFFSET is better used with arrays or lists of data. In Figure 2.9, there are revenue figures organized horizontally in row 4. In order to rearrange that data vertically, the OFFSET function is used with the assistance of a series of numbers that correspond to the reference location.
One of the more confusing aspects of using the OFFSET function is where to set the reference location cell. OFFSET is best used by starting the reference location at the top of a single-dimension array or at the upper-leftmost corner of a two-dimensional array. Although we could use OFFSET anywhere on the sheet to reference the data in a single- or two-dimensional array, the most efficient locations are the ones closest to the data described earlier. See Figure 2.10 for a graphical representation of the best places to set the reference location.
FIGURE 2.9 The OFFSET function is valuable to reference data in different directions and orders.
019
FIGURE 2.10 The starting reference point can be confusing for users new to the OFFSET function. When using OFFSET to reference single-dimension lists, start at the top. For two-dimensional sets of data, start at the corner.
020
One final aspect of the OFFSET function to notice is that it accepts numbers for the number of rows and columns to move from the reference location. To prepare for how we will use this function with another function, think about the inconvenience it would cause if we always had to provide the OFFSET function with numbers. Conveniently, the next function in this chapter’s Toolbox is a function that converts more understandable inputs into numbers that OFFSET can accept.

MATCH

On its own, the MATCH function is incredibly easy. It returns the ordinal value of a lookup value compared to a list of values. The entry parameters for the MATCH function are:
=MATCH(value to be looked up, range of cells that could contain the value being looked up, type of match)
Since this function’s parameters may need to be reread a few times, it is probably best explained by looking at an example. In Figure 2.11 we have a list that contains the possible periodicities that a model could be set to: Monthly, Quarterly, Semi- Annual, and Annual. If a user provided the periodicity that she was looking for, the MATCH function would return the ordinal number from the list. So, if the user typed Quarterly in a separate cell and designated that cell as the lookup value and the list of periodicities as the list of values, then the MATCH function would return a 2.
The MATCH function itself requires three parameters: the lookup value, the lookup array, and the type of match. The first parameter is the value that the user is trying to look up. This can be text, dates, or a number. The second parameter is the lookup array or the list of values. The final parameter that the MATCH function requires is the number 0, 1, or -1. This parameter designates the type of match that takes place. When working with text or exact values that can be found on a list, the 0 should be used since this parameter signifies an exact match. When a lookup is being attempted with a number that can fit within a range of numbers, the 1 or -1 should be used. A -1 indicates that the ordinal position of the smallest value that is greater than the lookup value will be returned. A 1 indicates that the ordinal position of the largest value that is greater than the lookup value will be returned. These last two options for match type are very useful when presented with buckets or stratifications of data that require values to be looked up against.
FIGURE 2.11 The MATCH function returns a 2 because Quarterly is the lookup value and the second item on the lookup array.
021

OFFSET MATCH Combination

We will definitely find utility for the OFFSET and MATCH functions on their own, but the real power of these two functions is when they are combined to find values or reference cells. Recall that the OFFSET function accepts numbers for the number of rows and columns to move away from a reference cell. It would be cumbersome to always have to provide OFFSET numbers as entries. Conveniently, we learned that the MATCH function returns numbers based on ordinal position. Let’s take a look at an example of the OFFSET MATCH combination, first in a decomposed form and then combined.
In our example we are going to try to return the number of months between periods, depending on the periodicity that the user selects. For instance, if the user selects Monthly, the return should be 1 month between periods. If the user selects Annual, the return should be 12, and so on. To set this up, we need a list of the possible periodicities and the corresponding number of months between periods. Figure 2.12 shows this initial setup.
In a separate cell, we could create the functionality by just using the OFFSET function. If we offset cell C1 by 1 row and 0 columns, a 1 would be returned. If we offset cell C1 by 2 rows and 0 columns, a 3 would be returned, and so on. So, we could build in functionality where the user provides a number for the periodicity and the OFFSET function returns the number of months between periods. Figure 2.13 depicts this addition.
FIGURE 2.12 To demonstrate the utility of OFFSET MATCH, we will use a periodicity-relatedexample.
022
Now many readers will say to themselves, in the current state this seems entirely useless and makes the process more complicated. If a user had to remember the order number of the periodicity, he might just as well enter the number of months between periods. The only advantage this setup currently has is it restricts users to four possible periodicities, rather than allowing the user to create custom periodicities that the model builder did not anticipate. However, we can make the process much more intuitive by introducing the MATCH function into the process.
Rather than having the user enter a number to return the number of months between periods, it would be better to allow him to enter something with more context, such as a description of the periodicity. We can alter the previous example by writing in the name of the periodicity that we want in cell E3. In cell F3, we could use the MATCH function by using cell E3 as the lookup value and the list of periodicities in range B2:B5 (note that this range was named lst_periodicities earlier) to return the ordinal location of the desired periodicity. Keep in mind that a 0 match type was used to designate an exact match. This will return a number from 1 to 4 depending on the desired periodicity and the order of the list. The altered example is shown in Figure 2.14.
FIGURE 2.13 While not complete, we can see in this example that OFFSET uses a number to offset the top of the list and return the correct number of months between periods.
023
FIGURE 2.14 The final addition is to use the MATCH function to derive the number that is used by the OFFSET function. Combined with a data validation list, the user can now select a periodicity based on name and have the number of months between periods easily returned.
024
Now we can connect the row reference for the OFFSET function to the return from the MATCH function in cell F3. Look in the formula bar in Figure 2.15 to see this quick change.
We can clean up this process in two ways:
1. It is precarious to have users type in the name of the periodicity that they want since if they make a misspelling or use different semantics the MATCH function could break down. To prevent such error, we should implement a data validation list in cell E3 that is based on the periodicity list from range B2:B5.
2. We do not need an additional cell for the MATCH function. We could replace the row reference in the OFFSET function that is currently set to cell F3 with the entire MATCH function that is in cell F3.
Figure 2.16 shows the completion of both of these efficiencies.
A number of discussion points are raised by this technique. The first is, why not just use the VLOOKUP function, which provides similar functionality, but with one function? While VLOOKUP is a powerful function, the major disadvantage is that the data must be contained in a continuous block or table of data. With OFFSET MATCH, we can create our lists anywhere and set the OFFSET in a completely different cell and/or sheet location. Additionally, VLOOKUP works only as its name implies: vertically. This means that if we wanted to implement a dual lookup, where we are looking up both vertically and horizontally, we would run into trouble. The OFFSET function can accept another MATCH function for a column lookup to pinpoint data in two-dimensional data sets. The final limitation is that VLOOKUP is limited in its ability to work with imperfect matches, such as trying to match 3.8 against the list 3,4,5. VLOOKUP would return 3. The MATCH function can handle more types of imperfect matches than VLOOKUP.
FIGURE 2.15 The OFFSET function is connected to the MATCH function’s return.
025
FIGURE 2.16 We can clean up the two separate cells by combining the functions.
026

VLOOKUP

Although the VLOOKUP function was not used in this chapter, it is frequently used by financial modelers, and therefore should be explained. The V in VLOOKUP stands for vertical. Pairing the words together we have a function that will return a value by looking at information in a vertical list. The entry parameters for VLOOKUP are:
=VLOOKUP(value to be looked up, continuous range of all values with the vertical list in the leftmost column, the column number from the lookup column where the return value is located, a TRUE or FALSE to determine the match type)
As with many preliminary explanations in this book, a first read-through can be confusing. It’s best to show VLOOKUP within the context of an example. Let’s use an example similar to the one from the OFFSET MATCH combination. Figure 2.17 shows the setup.
In this example, we have the list of periodicity names in range C3:C6 and the corresponding number of months between dates in range D3:D6. While it cannot be seen from the figure, there is a data validation list in cell F4. The VLOOKUP function is entered in cell F6. The firstparameter (the value to be looked up) is the user-selected periodicity name (cell F4). The range that is required for the VLOOKUP is C3:D6, which is the second parameter entered. Next, the function needs to know which column to provide the results from the range that was just specified. In this case it is column 2, which is hard coded in the formula. Finally, similar to the MATCH function, we need to specify whether our lookup value will be exactly matched to the list of possible values or approximately matched. In this case, we want an exact match, since the word Annual can be found exactly as it is spelled in the range C3:C6. Exact matches are designated by entering FALSE as the last parameter in the function. Many users new to VLOOKUP get odd results because they are trying to implement an exact MATCH, but leave the last parameter blank. If this parameter is omitted, the default setting is TRUE, which can return incorrect results.
FIGURE 2.17 The VLOOKUP function is an alternative to the OFFSET MATCH combination; however, it is less flexible and more cumbersome to use with complex lookups.
027

EDATE

Realizing the importance of date functionality, Excel developers created the EDATE function. This function takes a starting date and a numerical entry for months, and returns a date based on those two parameters. For instance, if the starting date were October 1, 2009, and the numerical entry were 3, the date returned would be January 1, 2010. The function accepts parameters in the following way:
=EDATE(start date, number of months from start date)
Figure 2.18 shows two uses of the EDATE function. The first one uses a posi tive number to return a date in the future, whereas the implementation below that example uses a negative number to return a date in the past. Notice that there were no hard-coded values within the EDATE function. This is an important habit to get intoto maintain flexible modeling. We can also begin to see that the number that is referenced for the number of months from the start date can be dynamic itself. That number can be changed by other functionality, which would in turn change the EDATE return.
FIGURE 2.18 The EDATE function can accept positive or negative values to return a date in the future or past.
028
There are three important points to keep in mind when using the EDATE function:
1. The parameters entered are very specific. The date must be in serial format if it is directly entered into the formula. This means that if you try to put 10/1/2009 directly in the formula, Excel will think you are trying to divide 10 by 1 by 2009. Also make sure that the value entered to move from the start date is in months. This cannot be changed, but it can be manipulated to work in quarterly, semi-annual, or annual periodicities, as shown earlier.
2. In order for EDATE to work, the Analysis Tool Pak add-in must be installed . Otherwise, a #NAME? error will be returned, which will populate through any references. If you get an advanced model with multiple #NAME? errors, a good troubleshooting technique is to install the Analysis Tool Pak add-in.
3. EDATE returns a date exactly the number of months from the start date. This means that there is no differentiation between 30- and 31-day months. For example, if the start date is on the 15th and a 1 is used as the number of months from the start date, the return date will fall on the 15th regardless of the starting month’s number of days.
For those creating models with settlement in mind or other date functionality, there is a function similar to EDATE that we will look at next.
FIGURE 2.19 EOMONTH always returns the last day of the month.
029

EOMONTH

The EOMONTH function is virtually identical to the EDATE function, with the difference being the day of month that gets returned. EOMONTH returns the last day of the month that is the specified number of months from the start date. The entry parameters are the same as EDATE:
EOMONTH(start date, number of months from start date)
To really show the difference, let’s use 10/15/2009 as a start date and enter a 3 as the number of months from the start date. In Figure 2.19, we can see that instead of returning 1/15/2010 as EDATE would, EOMONTH returns 1/31/2010.

IF

Many readers are used to IF functions, but we should formally cover them in case there is any confusion. An IF function has one of two possible returns based on a conditional test. In normal-speak, that means we will devise some sort of test and depending on the outcome of that test return a value. The value could differ if the outcome of the test differs. We have quite a bit of flexibility in creating the test, but it must be a conditional test—a test that returns either a TRUE or FALSE depending on a conditional operator. What is a conditional operator? There are many. The conditional operators seen in Figure 2.20 are the most common ones in Excel.
To use a conditional operator, you can put it between two values, such as 3 < 5. In this case, the translation of that statement is “three is less than five.” Now, imagine that we want to test that statement. We can write:
=IF(3 < 5
Although this formula is incomplete, we are telling Excel that we want to test the condition 3 < 5. In this case it is TRUE. If the statement is TRUE, then we might want a value to be entered in the cell where this formula resides. If the statement is FALSE, then we might want a different value entered in the cell. We could write:
=IF(3 < 5,“OK”,“ERROR”)
FIGURE 2.20 Conditional operators help build conditional tests.
030
Now the cell would have a text VALUE of “OK” since the statement is TRUE. IF functions return the first value that is after the conditional test if the conditional test is TRUE and the second value if the conditional test is FALSE.
Keep in mind that IF functions are very flexible. The conditional tests can compare values, dates, and text. They can also be formulas compared to each other. Similarly, the values that are returned can be numbers, text, dates, or formulas that calculate numbers, text, or dates.
We can also use IF functions in an intermediate fashion by nesting them. This means that we can test more than just one condition. This is done by writing an IF function and then writing another IF function if the first IF function is FALSE. For example:
=IF(A1>B1,“OK”,IF(A1>A2,“OK”,“ERROR”))
This formula tests the value in cell A1 and returns “OK” if it is greater than the value in cell B1. If that statement is FALSE, then cell A1 is compared to cell A2, and “OK” is returned if that statement is TRUE. If all of the conditional tests are FALSE, then “ERROR” is returned. You can nest up to eight IF functions.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.55.18