Uses & applications of microsoft excel in vph research
Prepared By: Uses & Applications of Microsoft Excel in VPH Research Dr. Alok Bharti
Microsoft Excel (full name Microsoft Office Excel) is a spreadsheet-application written and distributed by Microsoft for Microsoft Windows and Mac OS X. It features calculation, graphing tools, pivot tables and a macro programming language called VBA (Visual Basic for Applications). It has been the most widely used spreadsheet application available for these platforms since version 5 in 1993. Excel is included as part of Microsoft Office. What is Microsoft Excel?
spreadsheet 1. A type of application program which manipulates numerical and string data in rows and columns of cells. 2. The value in a cell can be calculated from a formula which can involve other cells. A value is recalculated automatically whenever a value on which it depends changes. 3. Different cells may be displayed with different formats. Worksheet 1. A sheet of paper with multiple columns; used by an accountant to assemble figures for financial statements. 2. A piece of paper recording work planned or done on a project. Workbook 1. A booklet containing problems and exercises that a student may work directly on the pages. 2. A manual containing operating instructions, as for an appliance or machine. 3. A book in which a record is kept of work proposed or accomplished. What is Basic Terms What is What is
Working Basics The Title Bar is located at the very top of the screen. On the Title bar, Microsoft Excel displays the name of the workbook you are currently using. At the top of your screen, you should see "Microsoft Excel - Book1" or a similar name. Open Excel. By default, Excel will open a blank workbook that contains three worksheets (spreadsheets). Each box, located in both a column and a row, is called a cell. The Menu Bar is directly below the Title bar and displays the menu. The menu begins with the word File and continues with the following: Edit, View, Insert, Format, Tools, Data, Window, and Help. You use the menu to give instructions to the software. Point with your mouse to a menu option and click the left mouse button. A drop-down menu will appear. You can now use the left and right arrow keys on your keyboard to move left and right across the Menu bar options. You can use the up and down arrow keys to move up and down the drop-down menu. To select an option, highlight the item on the drop-down menu and press Enter. The Tool Bar is directly below the Menu bar and displays the menu. It contains various buttons to perform different functions which can be executed on left mouse button click.
Microsoft Excel consists of worksheets. Each worksheet contains columns and rows. The columns are lettered A to IV; the rows are numbered 1 to 65536. The combination of column and row coordinates make up a CELL address . For example, the cell located in the upper left corner of the worksheet is cell A1, meaning column A, row 1. Cell E10 is located under column E on row 10. You enter your data into the cells on the worksheet. Cells can be formatted to help handle various types of data. Right click on a single cell, or a group of cells, and select “Format Cells” from the drop down menu. Brief descriptions of format types can be seen at the bottom of the dialog box. Take a moment to look through the various formatting options. Click cancel when you’re done. Working Basics
Basic elements of an Excel worksheet Cell reference/Name box Formula bar Double click on border between column and row headings to size to fit content Column heading Select all Active cell Worksheet tabs Row heading
Navigating an Excel Worksheet Starting a new Excel file • Option 1: Click on Start button. Click on New Office Document . Double click on Blank Workbook under General tab. • Option 2: Click on Start button. Click on Programs, Microsoft Excel. • Option 3: Double click on Excel icon on desktop. Setting up a worksheet • To name a worksheet, double-click on Sheet (#) at tab and type in name. Hit Enter . • To color code a worksheet tab, right click on tab, select Tab color. • To insert a new worksheet, click on Insert menu, then Worksheet ; to delete worksheet, click on Edit, Delete Sheet. • To move worksheets within a file, click on the worksheet tab and drag to new location. Navigating and selecting/highlighting • To change an active cell, use the arrow and Page Up and Page Down keys, click on a new cell, or drag the scroll bars. • To select (highlight) a range of cells, click a cell and drag the mouse pointer, or use Shift and the arrow key. • To select an entire column or row, click on the row or column heading (number or letter) • To select nonadjacent cells, hold down the Ctrl key and then click on the cells you want.
Moving columns and rows • Highlight column or row you want to move. • Right click and select Cut . • Highlight column or row where you want to place the cut column or row. • Right click and select Insert cut cells . Inserting and deleting • To insert a column or row: – Right click on column heading to the right of where you want new column, or row heading below row where you want new row. – Right click and select Insert ; OR click on Insert menu, then Columns or Rows . • To delete a column or row: – Right click on column or row heading you want deleted and select Delete ; OR select column or row and click on Edit menu, then Delete . • To save a file: click on File , then Save As and name the file.
Using Microsoft Excel in Public Health <ul><li>organize your data </li></ul><ul><ul><li>Using worksheets </li></ul></ul><ul><li>Protecting your data </li></ul><ul><li>Cleaning your data </li></ul><ul><ul><li>Using filters </li></ul></ul><ul><ul><li>Using data sort feature </li></ul></ul><ul><li>evaluation data </li></ul><ul><ul><li>Using formulas </li></ul></ul><ul><ul><li>Using pivot tables </li></ul></ul><ul><ul><li>Using charts </li></ul></ul>Rather than entering all your data and doing all your calculations on one worksheet, spread your work on different sheets and then name the sheets. Excel can use information in one sheet to make calculations in another sheet, so we can put data in one worksheet and the analysis in other worksheets. You've entered your data and now you don't want anyone to mess with it. You can protect the worksheet so people can read it and use it to make calculations, but they can't change any of the entries. To protect your sheet, place the cursor anywhere in the sheet, go to the Tools menu, click Protection, select Worksheet. Excel will ask you for a password. To activate the autofilter, while in the data sheet, go to the DATA menu, select FILTER, then select AUTOFILTER. When you do this, each variable name will have an arrow by it. Click the arrow and you'll see the values that Excel has detected in the columns. To use data sort, either select a single cell in the dataset or highlight the entire dataset, go to the DATA menu and select SORT. In the dialogue box, select the variable you want to sort by and whether you want to sort in ascending and descending order (for this purpose, it doesn't really matter which you choose), then click OK. Pivot tables allow you to look at the relationships between two or more variables. Most of the pivot tables that you will be using will rely on frequencies, in other words, counts and percentages of the number of cases that fall into a certain category. Charts, like other visual aids, enhance your presentation because they can convey a lot of information at a glance. Relationships buried in text can pop out when displayed in a chart. Once you have pivot tables, you can create tables that readily translate into a chart.
Data Entry and Organization Entering data • Move to the cell in which you want to enter information (numerical or text), type it in, press Enter or arrow keys to move to next cell. • Edit cell content in the Formula bar area, press Enter . • Begin equations with = (equal) sign. • Back up your file! Setting up a data entry template • Use column headings to identify variables and survey questions. • Incorporate survey question numbers into headings. • A Unique ID will allow you to tell records apart and strip your data of identifiers if you wish to share it later. Coding data Data coding means translating text or words into numbers (codes) to simplify information and prepare it for analysis. • Establish codes before collecting data and as you define variables and survey questions. • Keep track of codes on a separate worksheet or other document or on a blank copy of the data collection tool, survey, or questionnaire. • Adopt codes or numbers already assigned to the variables or survey instrument questions.
Formatting cells • Highlight the cells for formatting. • On Format menu, click Cells ; OR right click on highlighted cells and select Format cells . • Select Number tab to format the field type (date, currency, percentage, etc.) • Click on the Alignment tab to wrap text within cells, merge cells, etc. • Change or apply font styles, colors, patterns, and borders to make your worksheets more attractive and easier to read. Autofilter • Select a column or the entire worksheet. • Click Data, Filter, Autofilter . • Click on the arrow to the right of the column heading. • Select the entry you want to look at. All rows containing that entry will appear on the worksheet. • Turn off Autofilter using same steps. Data Sort • Select entire worksheet. • Click Data, Sort . • Select variable for sorting under Sort by . • Select Ascending or Descending sort order. • Select additional variables to sort by if needed. • Under My list has , select Header row or No header row . Click OK .
Analysis You can perform mathematical analysis in Excel by entering formulas, using the Formula bar, or using the quick sum function (∑). Use Pivot Tables to obtain the frequency of a series of values such as survey question results. Entering formulas • Type the formula in the cell in which you want the result of the calculation to appear. • Formulas must begin with an “=” sign. • You must use the appropriate arithmetic operator symbol: + sign to add - sign to subtract * sign to multiply / sign to divide • Use either upper or lower case in formulas. • Use parentheses for formulas with >1 operation such as a formula for calculating an incidence rate per 1,000 population in which you would first divide the number of cases by the total population and multiply that result times 1000. An example of this formula is: =(A3/B2)*1000 Entering functions in the formula • Place the cursor in the cell where you want the result. Type in “=” sign followed by the name of the function you want to use and a left parenthesis sign e.g., =average( • Following the left parentheses sign, type in the first cell reference, a period, the last cell reference, and the right parenthesis sign; OR select the cells containing the data you want to analyze. A colored line will appear around the cells containing data you want included in the analysis. • Click Enter . Enter the formula where you want the answer to appear Result is number of days between 2 dates Formula for calculating number of days between 2 dates in columns E and G
∑ (sum) symbol • Place cursor in empty cell where you want sum. • Click on ∑ symbol in tool bar. • Highlight cells to sum; OR enter cell range within parentheses after =SUM , inserting a period between cell references. • Click Enter to finish. • Excel enters cell references automatically when you place the cursor in the first empty cell below a column of consecutive figures you wish to add. Copying formulas and absolute references • Copying and pasting a formula into another cell changes cell references. This is appropriate most of the time. • However, when you want a figure in one cell as a constant in all formulas (usually the denominator), you must create an absolute reference by placing $ signs like this: a5/$b$7 Using the formula bar (fx) • Place the cursor in the cell for the result. • Click on the fx symbol in the formula bar. • In the Insert Function box, under Search for a Function , type in the function you want Excel to perform, e.g., median , and click Go . • Select Median in Select a function box. Click OK . • In Function Arguments box, type in the first cell reference, a period, and the last cell reference; OR select the cells. Click OK . (If the Function Arguments box is blocking the cells you want to select, diminish it by clicking on the red and blue square to the right of the Number box; click on it again to bring it back; OR move the box by clicking and dragging on the blue bar at the top.)
Creating a Pivot Table • In the upper-left corner of the worksheet, click the select all button to select all cells on the worksheet. • Click Data , and then click PivotTable and PivotChart Report . The PivotTable and PivotChart Wizard opens. • Click Microsoft Excel List or database as the location of the data to analyze, and PivotTable for kind of report (default settings). Click Next . • The correct data range should appear in the Range field. (A pulsing dashed line will appear around the data range.) Click Next . • Select New Worksheet as the location for the data. Click Layout to open the Layout dialog box . • You can ask different questions of the data and look at it in different ways depending on which fields you decide to use for rows, columns, and data. To see the frequency of values for 1 variable, drag and drop the field button anywhere in the Row and Data spaces. • When you are finished, click OK , and then click Finish . The PivotTable opens and the PivotTable toolbar appears.
Grouping data in the Pivot Table (frequency distributions) Sometimes you will need to group data to show the number of observations within certain ranges of continuous values. The Pivot Table will allow you to construct a frequency distribution for a continuous variable such as age or home radon test results. • In the Pivot Chart, select the cells that you want to group together. • Click Data , point to Group and Outline , and then click Group . • Excel names the groups Group1, Group2, and so on. You can rename groups by selecting the name and typing a new one. • If you need to arrange data elements in consecutive order before grouping them, click on the data element that you want to move, right click, select Order, and move the data element into the correct position. • Click the field button with the individual observations and drag it away from the Pivot Table. When a red X appears, release the mouse button. The reformatted Pivot Table shows a frequency count for the groups you have established. (Note: dragging and releasing field buttons also works for “emptying” the pivot table so you can reuse to analyze different variables.) • To see the records used to generate a group, double-click the appropriate group cell. Highlight the variable containing the detail you want in the Show detail box and click OK .
Creating a Pivot Chart from a Pivot Table • Click on the PivotTable toolbar and PivotChart. A bar chart will appear. • To change a chart type, click on Chart dropdown menu, Chart Type, and select type. • Click on Chart , then Chart Options to add a title, axis labels, change format, etc. • Click on PivotTable arrow and Hide PivotChart Buttons to eliminate them. • Type X axis value labels on the Pivot Table as you want them to appear in the chart. Creating a chart using Chart Wizard • Select columns containing data for the chart (including column headings). • Click on ChartWizard (bar graph) icon on toolbar. • Step 1 of 4 – Chart Type: Select chart type in Chart Wizard dialogue box (step 1 of 4). Click Next . • Step 2 of 4 – Chart Source Data: Click on Series tab and place cursor in box for Category (X) axis labels: Select labels on worksheet. When you let up on mouse, labels will appear on chart. Edit series labels in Name: box if desired. Click Next . • Step 3 of 4 – Chart Options: Type in title for chart and labels for category X and Y axis. • Click Next and Finish .
Printing Printing in Excel will be more successful when you utilize the Header and Footer, Page Break Preview , and Print Preview functions. Header and Footer • Click on View, and Header and Footer . • In Page Setup screen, select Sheet . • Click on Rows to repeat at top and Columns to repeat at left under Print titles and highlight rows and columns as desired. • Under Print , check Gridlines . Click OK . • Go to Header/Footer tab to select headers and footers for each printed page. Page Break Preview • Click on View and Page break preview . • Adjust number of columns and rows on page and number of pages in document by dragging blue lines left or right and up or down. • To exit page break preview, click on View, Normal . Print Preview • Click on File and Print Preview. Printing • After previewing page breaks, page setup, and headers and footers, you are ready to print. • Click on File , Print. • Go to Properties to choose paper size, orientation, etc. • Click on Selection to print selected cells. Total number of pages To scroll from page to page Set up for printing Adjust margins to center on page