University of Jordan College of Science Department of Mathematics Database Management In Excel (Windows XP) Dr. Mohammad Al-Raqab Fall 2005-2006 1 I. General Introduction-Excel The MS Excel is an electronic spreadsheet. An electronic spreadsheet is a tool to organize information in tables. The financial analysts, biologists, engineers, marketing specialists and managers use the electronic spreadsheets. Excel files are called workbooks, which contain worksheets. A worksheet consists of rows and columns. The rows are numbered and letters identify the columns. The intersection of a row and column is called a cell, which is a box that can store a number, word or formula. The elements of the Excel window are (1) Title Bar: Name of the book (document). (2) Menu Bar: Provides access to the commands on the menus. (3) Tools Bar: Summary of assorted commands. (4) Vertical Scroll Bar: Move backword and forward in your document. (5) Formula Bar: This allows you to see the contents of the active cell. (6) Status Bar: Displaying information about the document as well as the information about the position of the insertion pointer. If you click the New icon (the first icon on the Toolbar) you will see the following window. Note that the cell in row 1 column A is active, which means that you can type in a number, word or formula. You can designate any cell as active by moving the mouse pointer (which now appears as a large plus sign) and clicking. Alternatively, you can use any of the four Up, Down, Left, or Right arrow keys. At the bottom of the screen you will see the word Ready. As you begin to type something into the active cell, the word changes to Enter. Above this word you will find the following tabs: Sheet1, Sheet2, and Sheet3, the three worksheets that comprise this worksheet. You can operate on any of these as well as other sheets that may be created. 2 Editing Data: Each statistical technique requires that the data be in some specific format. If the data are not in that form, it will be necessary to edit the data. As a first step, you must highlight the data you wish to edit. To do so, place the mouse pointer over the first cell of the range, and hold the left button down as you move the mouse over the range. Alternatively, you can activate the first cell of the range, hold down the Shift key, and use the Up, Down, Left, or Right arrow keys to highlight the range. To delete the range, hit the delete key. To move up the range, place the mouse pointer at the top right corner of the range, depress the left mouse button, and move the mouse until the range is where you wish it to be. Release the button. Alternatively, click Edit and Cut. Activate the cell where the top of the range will be located, and click Edit and Paste. You can also use similar commands to copy a range of data. Instead of Cut, click Copy. II. Performing Statistical Procedures: There are several ways to conduct a statistical analysis. These are Data Analysis, Data Analysis Plus, Stats-summary.xls, and the Toolbar function fx. Data Analysis/Analysis ToolPak The Analysis ToolPak is a group of statistical functions that comes with excel. The Analysis ToolPak can be accessed through the Menu bar. Click Tools and Data Analysis …(Note that Analysis ToolPak is not the same as Analysis ToolPak-VBA.) If Data Analysis … does not appear, click Add-Ins … and select Analysis ToolPak. If Analysis ToolPak is not shown, you will need to install if from the original Excel or MS Office diskettes or CD-ROM. Run the setup program, and follow instructions. There are 20 menu items in Data Analysis … Click the one you wish to use, and follow the instructions described in this book. For example, the first technique in the menu: Anova: Single Factor. Data Analysis Plus: Data Analysis Plus is another collection of macros created to augment Excel's list of statistical procedures: Data Analysis Plus (STATS.XLS) is supplied and accompanied in some applied statistics books. The Stats.xls - must be stored in the XLStart folder on your hard drive. To install it, - You must find the XLStart folder. Under Windows, choose the Start Button, Find, and then type “XLStart” into the dialog box and click Find. Be sure to search all hard drives. The find dialog box will display the path to where the XLStart folder is. Make sure Excel is not running – Quit Excel if it is running. - Navigate to the XLStart folder on your hard drive. Open the Data Analysis Plus3.0 folder on the CD, select the Stats.xls file and drag it to the XLStart folder on the hard drive. Restart Excel. If you have multiple copies of Excel on your machine, make sure you install the Stats.xls file in the folder of the copy of Excel you want to use. 3 - If the above steps have been done correctly, the Data Anaysis Plus will become a menu in the Tools heading in the Menu Bar. Note that It contains 24 menu items. Excel with macros tool has a potential capabilities. It includes graphical representation, descriptive and inferential statistics (frequency tables, graphical representation, statistical measures, comparing between means, goodness-of-fit-test, equality of variances, regression and correlation, nonparametric approaches). It can export and import the data easily. Comparing with SAS or SPSS, it has less powerful in dealing with huge number of data or complicated situations. III- Mathematical Formula: Formulas are equations that perform calculations on values in your worksheet. A formula starts with an equal sign (=). For example, the following formula multiplies 2 by 3 and then adds 5 to the result. =5+2*3 A formula can also contain any or all of the following: - The PI() function returns the value of pi: 3.142... - References (or names): A2 returns the value in cell A2. A reference identifies a cell or a range of cells on a worksheet and tells Microsoft Excel where to look for the values or data you want to use in a formula. - Constants: Numbers or text values entered directly into a formula, such as 2. - Operators: The ^ (caret) operator raises a number to a power, and the * (asterisk) operator multiplies. Comparison operator = (equal sign) > (greater than sign) < (less than sign) >= (greater than or equal to sign <= (less than or equal to sign) <> (not equal to sign) Meaning (Example) Equal to (A1=B1) Greater than (A1>B1) Less than (A1<B1) Greater than or equal to (A1>=B1) Less than or equal to (A1<=B1) Not equal to (A1<>B1) Example 1: Consider the following data set (stored in letterGrade.xls): Name Ahmad Ali Muna Khalid Raed Fatima Alaa City Amman Amman Salt Irbid Zarqa Amman Aqaba Sex M M F M M F M Grade 60 77 92 85 88 34 69 (a) Find the sum of grades of the students 4 (b) Find the average of the grades of the students. (c) Change the grades to the letter grades (A: >=90, B:80-89,C:70-79, D:60-69, F:<60). (a) To find the sum of grades 1- First enter the data in the worksheet as follows: 2- Position the cursor in the cell you wish to include the result in. 3- Write = Sum(D2:D8) 4- Enter. The result = 505. You can use the function fx which includes some basic functions (Sum, average, Max, Min.,…). In this case, - Choose the sum from the dialog box (Insert function) - In the Box (Function Arguments), write the range of your data A2:D8. (b) Write =Average(D2:D8). The result= 72.14286. (c) IF(logical_test,value_if_true,value_if_false): Logical_test is any value or expression that can be evaluated to TRUE or FALSE. For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100, the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE. =IF(A2<=100,"Within budget","Over budget") If the number above is less than or equal to 100, then the formula displays "Within budget". Otherwise, the function displays "Over budget" (Within budget) =IF(A2=100,SUM(B5:B15),"") If the number above is 100, then the range B5:B15 is calculated. Otherwise, empty text ("") is returned () In our example, I can apply the if statement to cell D2 (which contains the number 60). - Choose any empty cell. - Write the following command: =IF(D2>=90,"A",IF(D2>=80,"B",IF(D2>=70,"C",IF(D2>=60,"D","F")))) 5 - Enter. You will get D. Dragging the fill handle of the cell D2 to all cells in the column D. Then we will have D C A B B F D IV. Graphical Representation: 1- Frequency Distribution and Histograms: Example 2: The following data stored in Xm04-2.xls represent the length time (in minutes) spent to finish a certain task. Develop a frequency distribution and histogram to describe the data. The classes are defined below: Classes More than 10 but less than or equal to 25 minutes More than 25 but less than or equal to 40 minutes More than 40 but less than or equal to 55 minutes More than 55 but less than or equal to 70 minutes More than 70 but less than or equal to 85 minutes More than 85 but less than or equal to 100 minutes More than 100 but less than or equal to 115 minutes More than 115 but less than or equal to 130 minutes More than 130 but less than or equal to 145 minutes More than 145 but less than or equal to 160 minutes Consider the following command code: Import Xm04-2.xls /B1=Limits, B2=upper limit of the first class, B3=upper limit of the second class, and so on to complete the listing of upper limites//Tools/Data Analysis/Histogram: Input Range: A1:A401/Bin Range: B1:B11(if the name of variable is included, click label/Chart Output/OK/ Click (with left button) Format Data Series/Options: Gap Width: change 150 to 0/OK/To remove More, Click Clear(with right button). The Frequency Distribution and the histogram are given by Limits 25 40 55 70 85 100 115 130 145 160 Frequency 3 106 150 83 30 16 8 2 1 1 6 2- Bar and Pie Charts for Normal Data: Example 3 (Xm04-3.xls): The data represent the area of employments of graduates as follows: 1=Accounting, 2=Finance, 3=General Management, 4=Market/Sales Consider the following command code: B1=Bins, B2=1, B3=2,B4=3,B5=4,B6=5 Tools/Data Analysis/Histogram: Input Range: A1:A254/Input Range: B1:B6 (if the name of variable is included, click label/Chart/Choose Column for Bar Chart and Pie for Pie Chart Frequency 150 100 Frequency 50 0 2 3 4 More Area Frequency 11% 2 25% 50% 3 4 More 14% Pie Chart of Area 7 3- Line Charts for Time Series Data Example 4 (Xm04-4.xls): Data on the weekly revenues of a restaurant for the 10 weeks Week Revenue 1 4854 2 5337 3 5205 4 5402 5 6001 6 5883 7 6309 8 5969 9 6040 10 6432 Command Code: Highlight the Data Column/Chart Wizard/Choose Line/Finish 7000 6000 5000 4000 3000 2000 1000 0 Series1 1 2 3 4 5 6 7 8 9 10 4-Scatter Diagrams (Two Continuous Variables) Example 5 (Xm04-5.xls): The data here are given on 2 variables: # of years he/she completed the degree and his/her income for the previous 12 months. Highlight the Data Column/Chart Wizard/Choose XY (Scatter)/Chart Subtype/Data Range, Input Range A1:B151/Next …Finish/Title:Scatter Diagram,XAxis=Education, Y-Axis=Income/Gridlines: remove check mark/Finish. To draw line: Chart and choose Trendline/OK/ Chart Title 120 100 80 60 40 20 0 Income 0 10 20 30 V- Descriptive Statistics: Example 6 (Xm04-2.xls): Command Code: Tools/Data Analysis/Descriptive Statistics/Input Range:A1:A401/Summary Statistics/OK/ 8 Times Mean Standard Error Median Mode Standard Deviation Sample Variance Kurtosis Skewness Range Minimum Maximum Sum Count 52.7 0.981987 48 41 19.63974 385.7193 2.706016 1.382361 128 23 151 21080 400 VI-Computations of Normal Probabilites: Click fx /Function Category:Statistical/ Function Name: NormDistribution/Ok/ Type the value of X=…, Mean=…,Std.=…, True(cumulative)/OK/ Short Command Code: =NORMDIST(20,10,5,TRUE) VII- Simple Random Sample: Example 8: (Generate 50 numbers between 1 and 1000) Tools/Data Analysis/Random Number Generation/Number of Variables=1, No. of Random Number=50/Uniform Distribution, parameters 0 and 1/OK/Col. B=1000*Col.A/Active Cell C1/Click fx , Math.&Trig.Round up/Next/Specify the first number to be rounded B1/Type # of digits (decimal places): 0/Finish/Complete Col. C. 9 VIII-Estimation and Testing Using t-distribution: Example 9 (Xm04-9): A sample of 240 households was drawn and the weekly weight of newspapers discarded for recycling for each household was recorded. (1) Estimate the mean weight of newspapers by 95% confidence Interval. (2) Do these data provide sufficient evidence to conclude that recycling newspapers is a viable project (mean weight is more than 2 pounds)? Command Code: Click fx/Choose Statistical,T INV/ Insert probability=P(|T|>t)=0.05 and df=239 You will get t=1.9699 (cut-of-point for 95% C.I.) Tools/Data Analysis Plus/t-estimates and test/Input Range A2:A241, Label, Hypothesized Mean/OK/ (a) The 95% C.I. for the mean is 2.0904 ± 1.9699(0.0268) (b) Test statistic=3.3769, p-value=0.0004, Reject the null hypothesis and the mean weight is more 2 pounds. t-Test and Estimate: Mean Column 1 2.0904 0.4148 2 239 3.3769 0.0004 1.6513 0.0008 1.9699 0.0268 0.052794 2.037622 2.143211 Mean Standard Deviation Hypothesized Mean df t Stat P(T<=t) one-tail t Critical one-tail P(T<=t) two-tail t Critical two-tail Standard Error Bound LCL UCL Similarly you can use z-test since the sample size is large. OR: You can apply Stats-Summary to determine 95% C.I. for the mean. t-Test of a Mean 8110 Sample mean Sample standard deviation Sample size 270.5 16 Hypothesized mean 8200 t Stat P(T<=t) one-tail P(T<=t) two-tail -1.33 0.1016 0.2031 10 You have to change the sample mean=2.0904, standard deviation=0.4148 and sample size=240 and Hypothesized mean=2, to get the following 95% C.I. for the mean: t-Test of a Mean Sample mean Sample standard deviation Sample size 2.0904 0.4148 240 Hypothesized mean 2 t Stat P(T<=t) one-tail P(T<=t) two-tail 3.38 0.0004 0.0009 Normality Test: Command Code: Tools/Data Analysis Plus/ChiSquare Test of Normality Chi-Squared Test of Normality Mean Standard deviation Observations Intervals (z <= -2) (-2 < z <= -1) (-1 < z <= 0) (0 < z <= 1) (1 < z <= 2) (z > 2) chi-squared Stat df p-value chi-squared Critical Column 1 2.092148136 0.4146 240 Probability 0.02275 0.135905 0.341345 0.341345 0.135905 0.02275 Expected 5.46 32.6172 81.9228 81.9228 32.6172 5.46 Observed 7 31 75 91 32 4 2.5074 3 0.474 7.8147 Using the p-value=0.474, we conclude that the normality follows. IX- Inferences about Proportions: Example 10 (Xm04-10.xls): Data on Election and the responses were 1= Democrat, 2=Republican. The responses of a sample of 926 voters. (a) Obtain 95% C.I. for p=proportion of democrat. Command Code: Tools/Data Analysis Plus/z-test and estimate proportion/Input Range A2:A241/Success=1/Ok/ 95% C.I. for p is (0.502, 0.567). 11 z-Test and Estimate: Proportion Column 1 Sample Proportion Observations Hypothesized Proportion z Stat P(Z<=z) one-tail z Critical one-tail P(Z<=z) two-tail z Critical two-tail 0.5346 926 0.5 2.1032 0.0177 1.6449 0.0354 1.96 Standard Error Bound LCL UCL 0.0164 0.032143 0.502414 0.566701 (b) Can you conclude that the proportion of democrat is different from 50%? Use α =0.05. H0: p=0.5, vs. H1: p ≠ 0.5 Z-test = 2.1032, critical z=1.96 so we reject H0. X- Comparing between Means: Example 11 (Xm04-11.xls): The assembly times for 25 workers in minutes were recorded using two methods. We would like to know whether the assembly times of the two methods differ. Assuming Not Equal Variances: H0: μ A = μ B vs. H1: μ A ≠ μ B Tools/Data Analysis/ t-test: Two-Sample Assuming Unequal Variances/Input: Variable 1 Range A2:A26, Variable 2 Range: B2:B26/Hypothesized Mean Difference:0/Click Label if applicable/specify α /OK/ t-Test: Two-Sample Assuming Unequal Variances Variable 1 Variable 2 Mean 6.288 6.016 Variance 0.847767 1.303067 Observations 25 25 Hypothesized Mean Difference 0 df 46 t Stat 0.927333 P(T<=t) one-tail 0.179297 t Critical one-tail 1.67866 P(T<=t) two-tail 0.358594 t Critical two-tail 2.012896 12 Assuming Equal Variances: H0: μ A = μ B vs. H1: μ A ≠ μ B Tools/Data Analysis/ t-test: Two-Sample Assuming Equal Variances/Input: Variable 1 Range A2:A26, Variable 2 Range: B2:B26/Hypothesized Mean Difference:0/Click Label if applicable/specify α /OK/ t-Test: Two-Sample Assuming Equal Variances Variable 1 Variable 2 Mean 6.288 6.016 Variance 0.847767 1.303067 Observations 25 25 Pooled Variance 1.075417 Hypothesized Mean Difference 0 df 48 t Stat 0.927333 P(T<=t) one-tail 0.179197 t Critical one-tail 1.677224 P(T<=t) two-tail 0.358393 t Critical two-tail 2.010635 The p-value is 0.3584. There is no significance difference between method A and method B. Using Worksheet Stats-Summary.xls (t-Estimate of the Difference Between Two Means (Equal-Variances)) t-Estimate of the Difference Between Two Means (Equal-Variances) Sample 1 Sample mean Sample standard deviation Sample size 6.2880 0.921 25 Sample 2 Sample mean Sample standard deviation Sample size Confidence level Pooled Variance estimate 6.0160 1.1420 25 0.95 1.0762 Difference between means Bound Lower confidence limit Upper confidence limit 0.2720 0.5900 -0.3180 0.8620 13 Financial Mathematics Functions 1. Present Value: Returns the present value of an investment. The present value is the total amount that a series of future payments is worth now. For example, when you borrow money, the loan amount is the present value to the lender. Syntax PV(rate,nper,pmt,fv,type) Rate: is the interest rate per period. For example, if you obtain an automobile loan at a 10 percent annual interest rate and make monthly payments, your interest rate per month is 10%/12, or 0.83%. You would enter 10%/12, or 0.83%, or 0.0083, into the formula as the rate. Nper: is the total number of payment periods in an annuity. For example, if you get a four-year car loan and make monthly payments, your loan has 4*12 (or 48) periods. You would enter 48 into the formula for nper. Pmt: is the payment made each period and cannot change over the life of the annuity. Typically, pmt includes principal and interest but no other fees or taxes. For example, the monthly payments on a $10,000, four-year car loan at 12 percent are $263.33. You would enter -263.33 into the formula as the pmt. If pmt is omitted, you must include the fv argument. Fv is the future value, or a cash balance you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (the future value of a loan, for example, is 0). For example, if you want to save $50,000 to pay for a special project in 18 years, then $50,000 is the future value. You could then make a conservative guess at an interest rate and determine how much you must save each month. If fv is omitted, you must include the pmt argument. Type: is the number 0 or 1 and indicates when payments are due. Set type equal to If payments are due 0 or omitted At the end of the period 1 At the beginning of the period Remarks • Make sure that you are consistent about the units you use for specifying rate and nper. If you make monthly payments on a four-year loan at 12 percent annual interest, use 12%/12 for rate and 4*12 for nper. If you make annual payments on the same loan, use 12% for rate and 4 for nper. • The following functions apply to annuities: 14 CUMIPMT CUMPRINC FV FVSCHEDULE IPMT PMT PPMT PV RATE XIRR XNPV An annuity is a series of constant cash payments made over a continuous period. For example, a car loan or a mortgage is an annuity. For more information, see the description for each annuity function. • • In annuity functions, cash you pay out, such as a deposit to savings, is represented by a negative number; cash you receive, such as a dividend check, is represented by a positive number. For example, a $1,000 deposit to the bank would be represented by the argument -1000 if you are the depositor and by the argument 1000 if you are the bank. Microsoft Excel solves for one financial argument in terms of the others. If rate is not 0, then: nper Pv*(1+rate) (1 + rate) nper − 1 + pmt*(1+rate*type)*( ) + fv rate If rate is 0, then: (pmt * nper) + pv + fv = 0 If rate is 0, then: (pmt * nper) + pv + fv = 0 Example: The example may be easier to understand if you copy it to a blank worksheet. 1. 2. 3. 4. 5. Create a blank workbook or worksheet. Select the example in the Help topic. Do not select the row or column headers. Press CTRL+C. In the worksheet, select cell A1, and press CTRL+V. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode. 15 A Data B Description Money paid out of an insurance annuity at the end of every 500 month 8% Interest rate earned on the money paid out 20 Years the money will be paid out Formula Description (Result) =PV(A3/12, 12*A4, A2, , 0) Present value of an annuity with the terms above (-59,777.15). The result is negative because it represents money that you would pay, an outgoing cash flow. If you are asked to pay (60,000) for the annuity, you would determine this would not be a good investment because the present value of the annuity (59,777.15) is less than what you are asked to pay. Note: The interest rate is divided by 12 to get a monthly rate. The years the money is paid out is multiplied by 12 to get the number of payments. 2. Net Present Value NPV: Calculates the net present value of an investment by using a discount rate and a series of future payments (negative values) and income (positive values). Syntax NPV(rate,value1,value2, ...) Rate: is the rate of discount over the length of one period. Value1, value2, ... are 1 to 29 arguments representing the payments and income. • • • • Value1, value2, ... must be equally spaced in time and occur at the end of each period. NPV uses the order of value1, value2, ... to interpret the order of cash flows. Be sure to enter your payment and income values in the correct sequence. Arguments that are numbers, empty cells, logical values, or text representations of numbers are counted; arguments that are error values or text that cannot be translated into numbers are ignored. If an argument is an array or reference, only numbers in that array or reference are counted. Empty cells, logical values, text, or error values in the array or reference are ignored. Remarks: • The NPV investment begins one period before the date of the value1 cash flow and ends with the last cash flow in the list. The NPV calculation is based on future cash flows. If your first cash flow occurs at the beginning of the first period, the first value must be added to the NPV result, not included in the values arguments. For more information, see the examples below. 16 • If n is the number of cash flows in the list of values, the formula for NPV is: n NPV = values j ∑ (1 + rate) j =1 • • j . NPV is similar to the PV function (present value). The primary difference between PV and NPV is that PV allows cash flows to begin either at the end or at the beginning of the period. Unlike the variable NPV cash flow values, PV cash flows must be constant throughout the investment. For information about annuities and financial functions, see PV. NPV is also related to the IRR function (internal rate of return). IRR is the rate for which NPV equals zero: NPV(IRR(...), ...) = 0. Example 1: The example may be easier to understand if you copy it to a blank worksheet. 1. 2. 3. 4. 5. Create a blank workbook or worksheet. Select the example in the Help topic. Do not select the row or column headers. Press CTRL+C. In the worksheet, select cell A1, and press CTRL+V. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode. A B Data Description 10% Annual discount rate -10,000 Initial cost of investment one year from today 3,000 Return from first year 4,200 Return from second year 6,800 Return from third year Formula Description (Result) =NPV(A2, A3, A4, A5, A6) Net present value of this investment (1,188.44) In the preceding example, you include the initial $10,000 cost as one of the values, because the payment occurs at the end of the first period. Example 2: The example may be easier to understand if you copy it to a blank worksheet. 1. Create a blank workbook or worksheet. 2. Select the example in the Help topic. Do not select the row or column headers. 3. Press CTRL+C. 4. In the worksheet, select cell A1, and press CTRL+V. 5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode. 17 A Data B Description Annual discount rate. This might represent the rate of inflation or 8% the interest rate of a competing investment. -40,000 Initial cost of investment 8,000 Return from first year 9,200 Return from second year 10,000 Return from third year 12,000 Return from fourth year 14,500 Return from fifth year Formula Description (Result) =NPV(A2, A4:A8)+A3 Net present value of this investment (1,922.06) Net present value of this investment, with a loss in the sixth year =NPV(A2, A4:A8, -9000)+A3 of 9000 (-3,749.47) In the preceding example, you don't include the initial $40,000 cost as one of the values, because the payment occurs at the beginning of the first period. 3. Cumulative Principal CUMPRINC : Returns the cumulative principal paid on a loan between start_period and end_period. If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in. 1. On the Tools menu, click Add-Ins. 2. In the Add-Ins available list, select the Analysis ToolPak box, and then click OK. 3. If necessary, follow the instructions in the setup program. Syntax CUMPRINC(rate,nper,pv,start_period,end_period,type) Rate: is the interest rate. Nper: is the total number of payment periods. Pv: is the present value. Start_period: is the first period in the calculation. Payment periods are numbered beginning with 1. End_period: is the last period in the calculation. Type: is the timing of the payment. Type Timing 0 (zero) Payment at the end of the period 1 Payment at the beginning of the period 18 Remarks: • • • • • Make sure that you are consistent about the units you use for specifying rate and nper. If you make monthly payments on a four-year loan at an annual interest rate of 12 percent, use 12%/12 for rate and 4*12 for nper. If you make annual payments on the same loan, use 12% for rate and 4 for nper. Nper, start_period, end_period, and type are truncated to integers. If rate ≤ 0, nper ≤ 0, or pv ≤ 0, CUMPRINC returns the #NUM! error value. If start_period < 1, end_period < 1, or start_period > end_period, CUMPRINC returns the #NUM! error value. If type is any number other than 0 or 1, CUMPRINC returns the #NUM! error value. Example: The example may be easier to understand if you copy it to a blank worksheet. 1. 2. 3. 4. 5. Create a blank workbook or worksheet. Select the example in the Help topic. Do not select the row or column headers. Press CTRL+C. In the worksheet, select cell A1, and press CTRL+V. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode. A Data B Description 9.00% Interest rate per annum 30 Term in years 125,000 Present value Formula Description (Result) The total principal paid in the second year of =CUMPRINC(A2/12,A3*12,A4,13,24,0) payments, periods 13 through 24 (-934.1071) The principal paid in a single payment in the first =CUMPRINC(A2/12,A3*12,A4,1,1,0) month (-68.27827) Note The interest rate is divided by 12 to get a monthly rate. The years the money is paid out is multiplied by 12 to get the number of payments. 4. Effect: Returns the effective annual interest rate, given the nominal annual interest rate and the number of compounding periods per year. If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in. 1. On the Tools menu, click Add-Ins. 2. In the Add-Ins available list, select the Analysis ToolPak box, and then click OK. 3. If necessary, follow the instructions in the setup program. 19 Syntax EFFECT(nominal_rate,npery) Nominal_rate: is the nominal interest rate. Npery: is the number of compounding periods per year. Remarks: • • • • Npery is truncated to an integer. If either argument is nonnumeric, EFFECT returns the #VALUE! error value. If nominal_rate ≤ 0 or if npery < 1, EFFECT returns the #NUM! error value. EFFECT is calculated as follows: Effect = (1+ No min al _ rate Nper ) -1 Nper Example: The example may be easier to understand if you copy it to a blank worksheet. 1. 2. 3. 4. 5. Create a blank workbook or worksheet. Select the example in the Help topic. Do not select the row or column headers. Press CTRL+C. In the worksheet, select cell A1, and press CTRL+V. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode. A Data B Description 5.25% Nominal interest rate 4 Number of compounding periods per year Formula Description (Result) =EFFECT(A2,A3) Effective interest rate with the terms above (0.053543 or 5.3543 percent) 20