Transcription of Formulas & Functions in Microsoft Excel
1 Formulas & Functions in Microsoft ExcelTheresa A Scott, MSBiostatistician IIDepartment of BiostatisticsVanderbilt of Contents1 Using Excel for Analysis .. 22 Formulas and Entering Formulas .. Entering Functions .. Reference Operators .. Autosum .. Function Wizard .. A Function instead of a Formula .. 83 Copying Formulas / Functions and Cell Relative Cell References .. Absolute Cell References .. Mixed Cell References .. 124 Other Topics to Automatic Calculation.
2 Order of Operations .. Using Named Ranges Formulas and Functions .. Linking Worksheets .. 15iPrefaceAll of the lecture notes and supplementary sample data files are located you have any questions, feel free to contact me drop by my officeD-2217 for this lectureThe following references were used to compile this lecture: The Excel 2003 Module information available from Carnegie Mellon Uni-versity s Computer Skills Workshop Class ( ). The BayCon Group Microsoft Excel Online Tutorial ( ).
3 The Florida Gulf Coast University Excel 2000 Tutorial ( ).1 Section 1 IntroductionThe distinguishing feature of a spreadsheet program such as Excel is that itallows you to create mathematicalformulasand executefunctions. Otherwise,it is not much more than a large table displaying text. Recall, your spreadsheet environment will become adynamicandrespon-sivework environment when you use Formulas and Functions ; they auto-matically updating when you change your following should be considered when creating a spreadsheet: Which terms are data/numbers that you will type.
4 What terms are data/numbers that you will calculate from the data. Which numbers are constant and are to be used in a variety of calculations. What arrangement of the columns and rows will make it easiest for youand your intended audience to work with the following are some guidelines on How to enter research data in acomputer spreadsheet for optimal statistical analysis , from Daniel , Enter all or most of the data as numbers. Avoid entering letters, words, or string variables ( , ?, *, NA, 22%,< ).
5 In Excel , all columns except names, and text comments should beformatted as numbers or dates (not as general or text).2. Give each column a unique, simple, 1-word name, 8 characters or less withno spaces, beginning with a letter, and place this name in the first 1. INTRODUCTION23. Put only one variable in a column. Do not combine variables in the same Enter each patient (or unit of analysis) on a separate line, beginning onthe second Give each patient a unique case number (1,2,3, etc.) in the first column.
6 Delete patient name, SS#, MR#, and any identifying informationbefore sending it to a Enter cases and controls in the same spreadsheet. Use one variable to define the control group (TREATED: 0 = no, 1= yes or GROUP: 1 = Drug A, 2 = Drug B).7. Quantify enter continuous measurements when Create a simple guide (or key) using a word processor to explain variablesabbreviations, and value coding, and how missing values were entered be Think through the analysis before collecting any Have a biostatistician review the coding before data are examples of a Spreadsheet from Heaven and a Spreadsheetfrom Hell.
7 Using Excel for AnalysisExcel is a great tool to use for data collection and entry, and even to use forsome derivation of other columns. However, ExcelIS NOTthe best tool touse to conduct advanced analyses, especially statistical valuescan be very dangerous in Excel . In Formulas and Functions , missing values ( blank cells) are sometimestaken as zeros, when they should represent data that are truly missing. Recommend consulting with an experienced statistician when wanting toconduct advanced and/or statistical analysis, or use packages like R, SPSS,or STATA.
8 Tip: Be aware of Excel sfaultsand, if possible, set up a simple exampleto test the function s handling of blank 2 Formulas and FunctionsAs mentioned, the ability to perform calculations is one of the purposes of usinga spreadsheet application. Some examples of the types of calculations that canbe done are: totals subtotals average standard deviationIn Excel ,the calculation can be specified using either aformulaor afunction. Formulasareself-definedinstructions for performing calculations. In contrast,functionsarepre-definedformulas that come with either case, all Formulas and Functions are entered in a cell and must be-gin with an equal sign =.
9 Entering FormulasAfter the equal sign, a formula includes the addresses of the cells whose valueswill be manipulated with appropriateoperandsplaced in between. The operandsare thestandard arithmetic operators:OperatorMeaningExample+Additio n=A7+A9-Subtraction=A7-A9*Multiplication =A7*A9/Division=A7/A9 Exponents=A7 A93 SECTION 2. Formulas AND FUNCTIONS4 Practice Exercise:Enter the following information into a blank worksheet(ignore any formatting) in columnsA,B, andC, and in rows1through6. Thencalculate theTotal Costfor the theFallsemester using aformulato add up theindividualCosts(Tuition,Housing, etc.)
10 CostsFallSpringTuition1000010000 Housing50005000 Books1000700 Spending15001000 Total Cost The most logical solution would be to type the formula =B2+B3+B4+B5 into can also enter Formulas by using thepoint mode, where you either clickon a cell with your left mouse button or you use the arrow keys. To enter =B2+B3+B4+B5 into cellB6using the point: Left click on cellB6to make it active. Type = . Use the up arrow key to move to cellB5, or left click on cellB5. Type + . Use the up arrow or mouse to add cellsB4,B3, andB2in the samefashion.