Using Microsoft Excel For Data Processing: Practical Work
Using Microsoft Excel For Data Processing: Practical Work
Fig. 3.47. The Microsoft Excel interface: 1 — ribbon; 2 — title bar; 3 — column names; 4
— formula bar; 5 — sheet labels; 6 — status bar; 7 — row numbers; 8 — active cell; 9 —
name box
The basic concept of a spreadsheet is a cell. A cell is an area defined by the intersection
of the column and the row of the spreadsheet.
The current (active) cell is a cell in the spreadsheet marked with a thick frame.
Entering text and numbers from the keyboard is performed in the active cell. To make a
cell active, point and click on it with the left mouse button. The address and contents of
the current cell are displayed in the name box and in the formula bar of the spreadsheet.
The cell address is designated as the column name vertically (one or two letters of the
Latin alphabet) and the name of the row (numeric symbol), for example, C30. A
2
reference is a way of indicating the address of a cell. A cell can contain different types of
information: numerical value, text value, date and time of day, formulas, hyperlinks, and
illustrations.
Numerical data cannot contain alphabetic and special characters, because
mathematical operations are performed with them.
Text data is descriptive and may include alphabetic, numeric and special characters.
Dates are the type of data that allows adding a number to a calendar date or calculating
the difference between two dates.
The formula is a set of values, links to other cells, named objects, functions and
operators that allows obtaining a new value. The formula always begins with an equal
sign (=).
A function is a standard formula that returns the result of certain actions over the
values that act as arguments. Functions allow simplifying formulas in sheet cells,
especially if they are long or complex. The function can be considered a special case of
the formula.
Numerical data in cells can be presented in different formats. The general format is
used by default, ensuring that the data in the cells are written in the same way as it is
entered or calculated. The format with a fixed number of decimal places provides the
representation of numbers in cells with a given accuracy. The percentage format provides
a percentage representation of the entered data in the form of percentages with a % sign.
The currency format provides a representation of numbers where every three digits are
separated by a comma.
Similar to other key Microsoft Office System applications, the user interface is
designed to increase efficiency by using command tabs as well as command sets and
context commands associated with specific objects in the worksheet. The main command
tabs present in MS Excel 2010 (2007) are the following.
• The File tab contains commands for working with files — creating, opening, saving,
printing, sending files, as well as the command for configuring the application
interface. (In MS Office 2007, the analogue of the File tab is the Office button.)
• The Home tab contains the commands required to work with the clipboard, select and
change fonts, manage cell alignment, select numeric formats, as well as edit, sort, and
search.
• The Insert tab contains commands for adding objects to the worksheets, such as
tables, diagrams, illustrations, links, and various text elements — column or row
names.
• The Page layout tab contains everything required to set up a worksheet, including the
selection of themes, page structure parameters, individual object size management,
worksheet parameter selection and sheet element ordering options.
• The Formulas tab contains the start buttons of the function wizard, function libraries,
commands required to create and a process named cells, audit commands for
formulas and calculation parameters.
• The Data tab contains commands for obtaining external data, managing external
connections, sorting and filtering data, eliminating duplicates, checking and
consolidating data, and grouping and uniting cells.
• The Review tab contains everything necessary for reviewing, commenting,
3
(fig. 3.57). Selecting a range of cells either copies the range in the direction of cursor
dragging or expands the range in this direction. It depends on the contents of the cells, the
form of selection, and whether the <Ctrl> key is pressed. If the selected cell or range does
not contain formulas, a small screen tip will appear next to the cursor, showing the values
entered into the cells as the cursor moves.
If a range, for example, A1:A2 is selected and the fill handle dragged downwards, a
row will be created equal to the interval between the two selected values as shown in
column A in fig. 3.58. If cells C1:C2 are selected and the <Ctrl> key held down while
dragging the fill handle down, the selected cells will be copied with the repetition of the
initial range.
If the fill handle is dragged down or to the right when creating a series, the values
increase. However, if the handle is dragged up and left, a series of decreasing values are
created.
If a text value is selected, the text is copied to new cells when the fill handle is dragged.
But if the selection contains both text and a number, MS Excel autofill is triggered, which
changes the numerical component and simply copies the text component. In this way, it is
possible to extend the number of dates, as well as to create a number of dates, for
example, «Quarter 1», «Quarter 2», etc. (fig. 3.59).
Fig. 3.59. Extending dates, text values, days of the week and months with autofill
On the fig. 3.60 columns A and В contain values with different intervals, and columns
C-J show how autofilI works, even when cells contain both text and numbers.
3.65).
If none of the offered charts suits, it is necessary to select the range of data, for which
the chart is supposed to be built, and use the button of the dialogue box in the lower right
corner of the Chart group (fig. 3.66). A chart will be built.
After inserting a chart, a context tool Chart Tools appears in the MS Excel window,
containing three tabs: Builder, Layout, and Format. MS Excel 2010 (2007) charting
tools are so simple and understandable that even a novice user can easily understand
them.
Fig. 3.66. Dialogue window Insert chart opened by pressing the dialogue window button
If it is necessary to change the data range for the given chart, then while the chart is
highlighted, it is necessary to press the Select data button in the Data group on the Chart
tools > Design tab and specify another data range in the dialogue window (fig. 3.67).
either in the Select data source dialogue box or in the Data group on the Chart tools >
Design tab.
Editing and formatting charts
A created chart can be edited (see fig. 3.67). A chart consists of a set of separate
elements, such as the graphics (data series), the axis of coordinates, the header of the
diagram, the construction area, etc.
Clicking an item highlights it by markers, and pointing at it displays a screen tip. A
dialogue window for formatting an item can be opened via the Format tab (for the
selected item) or via the context menu (Format command). If it is necessary to make
significant changes, it is possible to use the Design tab:
• in the Chart Layouts group, it is possible to change the name of the diagram, axes
labels and location of the legend;
• in the Type group using the Change Chart Type button, it is possible to open the
Change Chart Type dialogue box similar to the Insert Chart box (see fig. 3.66).
To delete a chart, it is possible to delete the worksheet on which it is located (Home >
Cells > Delete > Delete worksheet), or to select a chart embedded in the worksheet and
press the <Delete> key.
3.2.4. Links. Built-in functions. Statistical and logical functions Cell references
The formula can contain references, i.e. addresses of cells which contents is used in
calculations. Thus, the result of the formula calculation depends on the number in the
other cell. The cell containing the formula is dependent. The value displayed in the cell
with the formula is recalculated when the value of the cell indicated by the reference
changes. The reference can be set in different ways:
• the address of the cell can be entered manually;
• click on the desired cell or select the range to be entered (cells are highlighted with a
dotted frame).
Minimization buttons connected to the corresponding fields in all dialogue boxes
require specifying cell numbers (fig. 3.68). These buttons minimize the window to a
minimum size, making it easier to select cells on the sheet.
To edit a formula, double-click the corresponding cell. The cells, on which the value of
the formula depends, are highlighted on the worksheet with coloured frames, and the
references themselves are displayed in the cell and in the formula bar with the same
colour.
according to the relative position of the source cell and the copy being created.
In case of absolute reference (for example, $A$4), the address of the link does not
change during copying so that the cell to which the link refers is considered to be not
tabular.
To change the reference method when editing a formula, select a link to a cell and
press <F4>. The address of the cell is preceded by a $ sign.
Functions
MS Excel functions are special, pre-created formulas that allow to easily and quickly
perform complex calculations. They can be compared to the special keys on the
calculators for calculating square roots, logarithms, etc.
MS Excel has several hundred built-in functions that perform a wide range of different
calculations. Some functions are equivalents of long mathematical formulas which can be
entered by the user, while some functions in the form of formulas are impossible to
implement.
The functions categories in MS Excel are as follows:
• financial category allows to calculate interest, decrease and increase in the amount
of capital;
• date and time category contains functions for working with dates and time;
• statistical category provides calculation of statistical parameters;
• mathematical category contains functions of scientific calculators;
• lookup and reference category contains functions of data table processing;
• text category helps to compare, convert and format text in cells;
• logical category performs calculations that can result in TRUE or FALSE (yes or no)
values;
• database category handles lists and external databases;
• check properties and values category check the contents of the cell.
Statistical MS Excel functions
The use of statistical functions makes it easier for the user to perform a statistical
analysis of the data. In order to be able to use all the statistical functions, the Analysis
Toolpak add-on must be downloaded: select File > > Options > Add-ons, select the
Excel Add-ons option from the Manage drop-down list at the bottom of the Excel
Options dialogue box and click the next Go button, select the Analysis Toolpak
checkbox in the Add-ons dialogue box and click OK.
The basis of statistical analysis is the study of aggregates and samples. A sample is a
subset of the aggregate. An example of a sample is a public opinion survey. By examining
samples by calculating deviations and tracking the relationship with the general aggregate,
it is possible to track how representative the sample is. A number of MS Excel statistical
functions are designed for probability analysis.
Logical functions
Logical expressions are used to record conditions in which numbers, functions,
formulas, text, or logical values are compared. Any logical expression must contain at
least one comparison operator that defines the relationship between the elements of the
logical expression. The following is a list of MS Excel comparison operators:
• = ( Equal to);
• > (Greater than);
9
To apply the AutoFilter, click the Sort and Filter button on the Ноше Ribbon tab in
the Edit group (fig. 3.70) and select the Filter command (of course, a range of cells
should be selected beforehand).
Arrow buttons appear in the list columns; filter parameters can be adjusted by clicking
these arrows (fig. 3.71).
Images of fields to which filtration is applied are complemented with the funnel icon.
Pointing on the funnel icon is followed up by displaying the filtration criteria (fig. 3.72).
Text filters and Numerical filters in the triangular button menu (see fig. 3.71) are
used to create more complex selection criteria. In the Custom AutoFilter window, it is
necessary to set up the final filtering criteria (fig. 3.73).
1. Click on arrow button of a filter and expand the filter menu.
2. In the menu, select the command Numerical Filters > Adjustable Filter or Text
Filters > Adjustable Filter.
3. In the Custom AutoFilter dialogue box, select a selection criterion (e.g., more) and
enter a value (e.g., 28).
4. Click OK.
When using the advanced filter selection criteria are specified on the worksheet. This
can be achieved as follows.
c
Fig. 3.69. Lists: a — initial; b — sorted by column В; с — filtered
11
1. Copy and insert in an unoccupied space the list head. Fill in the relevant field
(fields) with the required filtration criteria (fig. 3.74).
3. On the Data tab of the ribbon, in Sort and Filter group, click the Filter button.
4. Then, click the Advanced button in the same group.
5. In the Advanced Filter dialogue box that appears, specify the necessary ranges of
cells (fig. 3.75).
To sort a list by several fields, click Custom Sort to open the Sort dialogue box (fig.
3.78).
Practical homework
1. It is necessary to construct a diagram of the dependence of the change in the value of the erythrocyte sedimentation rate
during the course of the disease (bar graph)
days: 1 3 5 7 9
sick А. 37,2 38,4 38,9 37,7 36,8
sick Б. 36,9 37,3 37,8 38,5 39,3
Let us consider two groups of patients with tachycardia, one of whom (control) received traditional treatment, the other (study)
received treatment according to a new method.
Determine the mean, standard deviation, correlation coefficient
Контроль Исследование
162 135
156 126
144 115
137 140
125 121
145 112
151 130
Calculate total, percentage and build a graph
Hospital performance indicators №8
Years 2016 2017 2018 Total
Plan 500 550 600 ?
Fact 480 540 610 ?
percent ? ? ? ?
Make presentations by topic
1. Basic concepts of medical statistics. Descriptive statistics.
2. Processing of biomedical information by means Microsoft Excel spreadsheets
3. Computer Analysis of Public Health Data
4. Planning complex social health research
5. Using Excel Spreadsheets for statistical calculations
6. Computer analysis of medical data