V O L U M E 4 Microsoft Excel 007 Critical Data Analysis Using Functions DASH DESIGNS CONSULTING Technology Training and Consulting Services
Excel 007 Critical Data Analysis Using Functions For The Haas School of Business, UC Berkeley - Dash Designs Consulting
Microsoft Excel 007 Critical Data Analysis Using Functions For The Haas School of Business, University of California Revised: August 1, 007 Copyrights and Trademarks 007, Dash Designs Consulting, Jerry Maletsky San Rafael, CA 94903 email: jerry@dashdesignsconsulting.com web site: www.dashdesignsconsulting.com fax (415) 491-1490 Dash Designs Consulting gives permission to the Haas School of Business of the University of California at Berkeley to reprint this training manual for internal use only. No re-sale of this material or renunciation of copyrights are granted by this author. Any mention or use of Microsoft, University of California, or any third party products is hereby acknowledged by Dash Designs Consulting to be for the sole purpose of editorial and educational use of this training manual and for the benefit of the mentioned Excel 007 Critical Data Analysis Using Functions For The Haas School of Business, UC Berkeley - Dash Designs Consulting
Table of Contents Managing Large Amounts Of Data Freezing Worksheet Titles... Splitting Worksheet Windows... 4 Display Magnification... 6 Conditional Formulas Evaluating With IF Statements... 8 Summing, Counting, Averaging Conditionally... 16 Retrieving Data With VLookup... 0 Ranking Data With Functions... Analyzing With Date Functions... 6 Examples Of Other Functions Financial Functions... 34 Text Functions... 36 Reference Workbook: UC Excel 007 - Data Analysis Workbook.xls Excel 007 Power of Calculations For The Haas School, UC Berkeley Dash Designs Consulting
Microsoft 1 Excel 007 Data Analysis With Functions For Jerry Maletsky Dash Designs Consulting Technology Training And Consulting 1
1 Managing Large Amounts Of Data Reference Worksheet: Monthly Figures FREEZING WORKSHEET TITLES Viewing the row and column headings as a user scrolls through data in a large worksheet is not possible even with a large display area. For example, a user might have a worksheet containing monthly sales, expenses, and profits for several departments. As that user scrolls through the data, the headings for the months and/ or the departments may not be visible making the data less apparent to that user. Excel does provide a process in which the user can freeze the row and column headings so that as the user scrolls through the worksheet those headings will remain visible on the screen. That command, Freeze Panes is on the View tab. Excel will display dark lines to the right of a frozen column and just below a frozen row. To Freeze Worksheet Headings Steps: Click into the cell below the column headings and/or the row headings to be frozen Click View tab: Freeze Panes command To Un-Freeze Worksheet Headings Steps: Click View menu: Unfreeze Panes command
Managing Large Amounts Of Data in Excel 007 1 FREEZING WORKSHEET TITLES View Tab: Freeze Panes command (place cursor in cell below column headings and to the right of row headings) Before Freezing Panes After Freezing Panes 3
1 Reference Worksheet: Monthly Figures Managing Large Amounts Of Data SPLITTING WORKSHEET WINDOWS Splitting the worksheet window provides the user with separate scrollable windows within the same worksheet. Splitting allows the user to scroll and view separate sections of the worksheet simultaneously. For example, a user could view 1st Qtr data in the top half of the worksheet window and compare that with the 4th Qtr data in the bottom half of the worksheet window. The worksheet window can be split both vertically and horizontally. Shortcuts to activate the splits are located at the top of the Vertical Scroll Bar and the far right of the Horizontal Scroll Bar. Additionally, the command can be activated in the View tab: Split command. To Split The Worksheet Window Steps: Drag or Double-Click the Split Bar on either scroll bar Or... Click into the cell below the column headings and/or the row headings to be split Click View tab: Split command To Un-Split The Worksheet Window Steps: Drag or Double-Click the Split Bar on either scroll bar Or... Click View tab: Split command (it toggles the command on or off) 4
Managing Large Amounts Of Data 1 SPLITTING WORKSHEET WINDOWS Split Worksheet Window 5
1 Reference Worksheet: Monthly Figures Managing Large Amounts Of Data CHANGING THE DISPLAY MAGNIFICATION A large worksheet can be easier to work with when magnification is applied. Magnification can be increased or decreased using the Zoom Slider. The default is set at 100% and can be increased to about 400% or decreased to 10%. This allows the user to view more data on the screen as well as make the data easier to see during a presentation. Steps: TO GENERALLY SET THE MAGNIFICATION Click into the Zoom Slider Slide the Zoom Slider bar to preferred value TO FOCUS ON A SPECIFIC GROUP OF CELLS Select the preferred cells Slide the Zoom Slider bar to preferred value Click into the Zoom Slider TO RE-SET THE MAGNIFICATION Slide the Zoom Slider bar to 100% 6
Managing Large Amounts Of Data 1 CHANGING THE DISPLAY MAGNIFICATION Worksheet Magnified to 75% Worksheet Magnified to Selection Zoomed to selected cells (i.e. 150%) 7
Conditional Formulas Reference Worksheet: Conditional Formulas EVALUATE CONDITIONS WITH THE IF STATEMENT FUNCTION Suppose you want to offer a discount to customers that reach a specified goal as an incentive. Normally, you would have to monitor that data constantly and update the worksheet when a discount is applicable. With an If statement you can have that discount calculated automatically when the customer s revenue reaches its goal. The If Statement Function allows you to automatically evaluate a condition in another cell (or cell range) and place a result in the formula cell depending on whether that condition is evaluated True or False. For example, if a sales rep exceeds their quota, you can have Excel place a calculation in the formula cell that calculates a bonus for that sales rep; if not, you can have Excel place a zero (0) in the formula cell. The condition (also know as the Logical Test) must be something that can be evaluated to be True or False using a comparison operator (see table below). The True Result or the False Result can be a number, a calculation, or text (text must be placed in quotation marks). The syntax of the IF Function is as follows: =IF(Logical Test, Value IF True, Value IF False) The If Statement Logical Test argument requires a comparison operator Comparison Operator Description = Equal To < > Not Equal To > Greater Than < Less Than >= Greater Than Or Equal To <= Less Than Or Equal To 8
Conditional Formulas EVALUATE CONDITIONS WITH THE IF STATEMENT FUNCTION IF Function Examples =IF(D14>50,E14*1.5,0) What They Mean If the value in cell D14 is Greater Than 50, then take the value in E14 and add 5% (1.5) to it; if not, just place a zero (0) in the result cell. =IF(Average (J5:J45<=130),K5*3.5,K5*.5) =IF(C10<>Average(D10:D5), Yes, No ) If the result of the Average of cells J5 through J45 is Less Than Or Equal To 130 then take the value in cell K5 and multiply it times 3.5, if not multiply K5 times.5. If the value in cell C10 is Not Equal To the Average of cells D10 through D5 then place the text Yes in the result cell, if not place No in the result cell. =IF(A15=G35,500, ) If the value in cell A15 is Equal To the value in cell G35 then place the value 500 in the result cell, if not, put a space in the result cell. 9
Conditional Formulas Reference Worksheet: Conditional Formulas ANALYZING DATA USING MULTIPLE IF STATEMENT FUNCTIONS You can nest multiple IF functions (up to 7) to evaluate more than one condition within the same function. For example, if you were able to get a discount based on unit purchases, you would want to calculate a formula that calculated the total cost based on how many units. If the first condition in the IF function is not true, you can evaluate whether another condition is true before a result is selected. In this way, you can have more control in the result that is placed into the formula result cell. Some examples of multiple If Statement functions are: =IF(I8= A,H8*10%,IF(I8= B,H8*5%,H8*%)) =IF(B5>=500, A,IF(B5>=400, B,IF(B5>=300, C,IF (B5>=00, D, F )))) Note: In a multiple nested IF Statement Function you type a closing parenthesis for each IF Statement you created (up to 7). 10
Conditional Formulas ANALYZING DATA USING MULTIPLE IF STATEMENT FUNCTIONS Multiple If Statements Using the Maximum of 7 11
Conditional Formulas Reference Worksheet: Multiple Conditions IF FUNCTIONS ANALYZING DATA USING MULTIPLE AND CONDITIONS The AND condition in an IF Statement Function allows you to test multiple conditions. In order for the IF statement function to return a True result all conditions in the function must evaluate to True. You can have up to 30 conditions in the AND function. Each condition must be separated by a comma!! An example of multiple And conditions in an If Statement functions: =IF(AND(B6<100000,D6= E ), Yes, ) 1
Conditional Formulas Reference Worksheet: Multiple Conditions IF FUNCTIONS ANALYZING DATA USING MULTIPLE OR CONDITIONS The OR condition in an IF Statement Function allows you to test multiple conditions. In order for the IF statement function to return a True result only one of the conditions in the function must evaluate to True. You can have up to 30 conditions in the OR function. condition must be separated by a comma!! Each An example of multiple OR conditions in an If Statement functions: =IF(OR(B6<100000,D6= E ), 30 days, ) 13
Conditional Formulas Reference Worksheets: ISERROR Statements USING THE ISERROR FUNCTION The ISERROR function can be used within an If Statement Function to replace error messages that might result from data in the worksheet with an alternative result. The ISERROR function returns a logical True in an IF statement if any of the error values such as: Error Value #N/A #VALUE #REF Description Occurs when a value is not available to a function or formula. Occurs when the wrong type of argument or operand is used. Occurs when a cell reference is not valid. #DIV/0 Occurs when a number is divided by zero (0). #NUM #NAME #NULL Occurs with invalid numeric values in a formula or function. Occurs when Microsoft Excel doesn't recognize text in a formula. Occurs when you specify an intersection of two areas that do not intersect. The intersection operator is a space between references. For example, not placing a colon (:) in between a cell range (i.e., C10:C14) or not placing a comma to separate arguments in a formula (i.e., =Sum(C6:C1,F6:F1). An example of the ISERROR function is: =IF(ISERROR(Average(F8:F13)), No Data,Average(F8:F13)) (See Next Page for Worksheet example) 14
Conditional Formulas USING THE ISERROR FUNCTION Worksheet Without ISERROR Statement Worksheet With ISERROR Statement 15
Conditional Formulas Reference Worksheet: SumIF, AverageIF, and CountIF SUMMING DATA CONDITIONALLY Suppose you want to add data within a range only if it meets certain conditions. Excel s SumIf function allows you to do just that. Where Sum will only add all the values in the specified cell range, SumIf will add values in a cell range depending on whether those values fall within the specified conditions. 16
Conditional Formulas COUNT VALUES CONDITIONALLY The Count function counts the number of cells within a given range. Suppose you want to count values within a range only if those values meet certain conditions. For example, you may want to count the number of customers who have exceeded given goals. Excel s CountIF function allows you count values in a cell range depending on whether those values fall within the specified conditions. 17
Conditional Formulas Reference Worksheet: SumIF, AverageIF, and CountIF AVERAGING VALUES CONDITIONALLY The Average function finds the average value within a given range. Suppose you want to average values within a range only if those values meet certain conditions. For example, you may want to average revenue for orders where they meet certain conditions. Excel s AverageIF function allows you count values in a cell range depending on whether those values fall within the specified conditions. 18
Conditional Formulas CALCULATING VALUES BASED ON MULTIPLE CONDITIONSCONDITIONALLY Excel s SumIF, CountIF, and AverageIF functions calculate a range of cells based on one set of conditions. However, in addition to these functions, Excel 007 provides the ability to calculate a range of cells based on multiple conditions with the SumIFS, CountIFS, and AverageIFS functions. These functions can contain up to 17 ranges and conditions. Note: Criteria has to be evaluated as an And condition. That is, they can not be mutually exclusive. 19
Retrieving Data With VLookup Function Reference Worksheet: Orders Supporting Worksheets: Inventory, Customers RETRIEVING DATA WITH THE VLOOKUP FUNCTION As you collect data the need to analyze that information in a spreadsheet will become important. The VLookup function enables you to retrieve data that exists in a list in another part of your workbook, or another workbook so you won t have to copy that data yourself. The VLookup function requires that you have a list in which the first column of the list contains the value that matches a value already in your worksheet. The list should also be sorted on that first column in Ascending order. The VLookup function consists of four arguments. The first three are required. An example of the VLookup Function: =VLOOKUP(D6,Customers,5,FALSE) Argument Description Lookup Value (D6) Table_Array (Customers) Col_Index_Num (5) Range_Lookup (False) Cell Address, Number, or Text String that is found in your worksheet and matches a value in the first column of the list. Cell Range or Name of cell range that makes up the cell range of your list. The number that represents the column in the list that contains the value that you want to retrieve. For example, if the value that you want is in the 5th column of the list, the value you enter is 5. A Logical value of True or False. True (or left empty) asks Excel to find the closest lowest value if it cannot find an exact match to your Lookup_Value. False asks Excel to only find an exact match to your Lookup_Value or else return an error message (#N/A) Customer List Table named Customers Sorted in Ascending Order 0
Retrieving Data With The VLookup Function RETRIEVING DATA WITH THE VLOOKUP FUNCTION 1
Reference Ranking Data With Functions Worksheet: Ranking Data FINDING A VALUE BASED ON A PERCENTAGE VALUE The Percentile function returns a value in a range that corresponds with a specified percentile ranking. For example, if you wanted to only market to customers who fall above the 50% percentile of a group of sales data, you can use the Percentile function to establish what that value would be. Example: =PERCENTILE(B5:B1,0.5)
Ranking Data With Functions Reference Worksheet: Ranking Data RANKING THE PERCENTILE OF A VALUE The PercentRank function will return a percentage based on a specified value in a given cell range. For example, if you use the PercentRank function to evaluate Japan s percentile ranking from the sales data below you would find that Japan falls into the 57.1 percentile in the year 000. Example: =PERCENTRANK(B5:B1,B9,3) Note: The Significance argument refers to the number of decimal places to calculate to in this function. If no significance is specified, then it is assumed to be calculated to 3 decimal places. 3
Reference Worksheet: Ranking Data Ranking Data With Functions FINDING THE QUARTILE OF A RANGE OF VALUES The Quartile function returns a value based on a cell range that corresponds with a specified variable that divides the distribution of the variable into four groups having equal frequencies. For example, if you wanted to find what revenue value corresponded to the 5th, 50th, or 75th percentile of a group of sales data, you can use the Quartile function to establish what that value would be. Example: =QUARTILE(B5:B1,3) 4
Ranking Data With Functions Reference Worksheet: Ranking Data ESTABLISHING THE RANK OF A VALUE The Rank function will return a value based on a specified value rank within a given cell range. For example, if you use the Rank function to evaluate the European Union ranking from the sales data below, you would find that the EU revenue (1.30) ranks (in descending order) in the year 000. Example: =RANK(B7,B5:B1) or =RANK(C7,C5:C1,1) 5
Analyzing With Date Functions Reference Worksheet: Trade Show Dates ANALYZING DATA WITH DATE FUNCTIONS When you enter a date into a cell, Excel automatically formats that cell as a date and considers it a number so you can execute calculations on it. Excel recognizes a variety of date formats that you might type in a cell. For example, 10/15/004, 10-Oct, 10/004, 10-4, etc. Below are some important date functions you might find useful in analyzing data. Function =Today( ) =Now( ) =Date (Year,Month,Day) Description Automatically displays the current date in the cell. Automatically displays the current date and time in the cell. Displays the date based on the arguments you enter. For example, if you enter... =Date(004,10,15) the result displayed will be 10/15/004. Important: Dates should be entered by using the DATE function, or as results of other formulas or functions. Problems can occur if dates are entered as text. =Days360 (StartDate,EndDate) Calculates the number of days between the two dates, based on a 360-day year. =NetWorkDays (StartDate,EndDate, Holidays) =Year(Date) =Month(Date) Returns the number of whole working days between start_date and end_date. Working days exclude weekends and any dates identified in holidays. Returns the year portion of a date in a given cell (i.e. 006). Returns the month portion of a date in a given cell (i.e. 1) 6
Analyzing With Date Functions USING DATE FUNCTIONS Example of the NOW( ) function: Example of the TODAY( ) function: Example of a complex date calculation: 7
Reference Worksheet: Trade Show Dates Analyzing With Date Functions KEEPING DATES CURRENT IN EXCEL When entered into a cell, the Today and the Now functions will return the current date and/or time from the computer s clock each time that workbook is opened. Note, that although these functions have no arguments you must include the opening and closing parenthesis ( ). Example: =Today( ) =Now( ) ENTERING A DATE USING THE DATE FUNCTION Although you can enter a date by simply typing it into a cell (i.e. 6/7/007) Microsoft maintains that dates should be entered by using the DATE function, or as results of other formulas or functions. Problems can occur if dates are entered as text. Example: =Date(007,3,15) returns 3/15/007 8
Analyzing With Date Functions Reference Worksheet: Trade Show Dates CALCULATING THE DAYS IN A 360-DAY CALENDAR YEAR The Days360 function calculates the number of days between the two dates, based on a 360-day year. Although there are typically 365 days in a year many companies base their calendar year on a 360 day period. Example: =Days360(StartDate,EndDate,Method) Note: CurrentDate in the above calculation is a Named Range that refers to the value in cell A4. 9
Analyzing With Date Functions Reference Worksheet: Trade Show Dates CALCULATING ONLY WORKDAYS BETWEEN TWO DATES NetWorkDays calculates the number of whole working days between start_date and end_date. Working days exclude weekends and any dates identified in holidays Example: =NetWorkDays(StartDate,EndDate,Holidays) Note: CurrentDate in the above calculation is a Named Range that refers to the value in cell A4. Holidays is a Named Range that refers to the values in cells B11:B5. 30
Analyzing With Date Functions Reference Worksheet: Trade Show Dates CALCULATING ONLY WORKDAYS BETWEEN TWO DATES YearFrac calculates the number of years (and partial years) between a start_date and end_date. Example: =YearFrac(StartDate,EndDate) 31
Analyzing With Date Functions Reference Worksheet: Product Launch Dates EXTRACTING THE YEAR FROM A DATE The Year function returns the year portion of a date in a given cell. For example, if a cell contained the date, 4/17/006 the year function would return 006. Examples: =Year(Date) 3
Analyzing With Date Functions Reference Worksheet: Product Launch Dates EXTRACTING THE MONTH FROM A DATE The Month function returns the month portion of a date in a given cell. For example, if a cell contained the date, 4/17/006, the month function would return 4. In addition, you can extract the month name using the Text Function (converts numbers to text format). Examples: =Month(Date) =Text(Value,Format) 33
3 Examples Of Other Functions Reference Worksheet: Financial Functions FINANCIAL FUNCTIONS Excel provides a variety of financial functions that make calculating fiscal data more efficiently. These include: Function PMT NPV RATE FV Description Returns the periodic payment of an annuity Returns the Net Present Value based on a series of periodic cash flows and discount rate Returns the interest rate per period of an annuity Calculates the Future Value of an investment 34
Examples Of Other Functions 3 Reference Worksheet: Financial Functions FINANCIAL FUNCTIONS 35
Examples Of Other Functions 3 Reference Worksheet: Text Functions TEXT FUNCTIONS Text functions allow the user to extract information from a larger entry in a cell. These include: Function LEFT RIGHT MID PROPER Description Returns the Leftmost characters from a cell entry Returns the Rightmost characters from a cell entry Returns a specific number of characters from a text string starting at the position you specify Capitalizes the first character of each word in a cell entry 36
Examples Of Other Functions 3 Reference Worksheet: Text Functions TEXT FUNCTIONS 37