1. Microsoft Excel 2007
Introduction to Spreadsheet Programs
DR. N.K. CHAURE
PRINCIPAL SCIENTIST (AGRIL. STATISTICS)
INDIRA GANDHI AGRICULTURAL UNIVERSITY
BTC COLLEGE OF AGRICULTURE & RESEARCH STATION
BILASPUR CG
Email: nkchaure@gmail.com, Cell-9425543810
2. Introduction
Excel performs quantitative data analysis
within the context of a business and management
research project. Excel covers some of the key
features that are particularly useful when doing a
research project.
AN INTRODUCTION TO USING
MICROSOFT EXCEL FOR
QUANTITATIVE DATAANALYSIS
3. We assume that you are already familiar with the
basics of using Excel (e.g. how to create worksheets,
enter data, use formulae and functions, create charts
(graphs), print and work, etc.).
If you have never used Excel, there are many
reasonably-priced textbooks to get you started.
Alternatively, you may find that Excel training or
support material is available in your institution.
There are also various websites, PPt’s and PDF
including Microsoft’s Office Support that offer advice
to get you started.
4. Why use Excel ?
So many specialist software packages available, why
use Excel for statistical analysis?
Convenience and cost are two important
reasons: many of us have access to Excel on our own
computers and do not need to source and invest in other
software.
Another benefit, particularly for those new to data
analysis, is to remove the need to learn a software program as
well as getting to grips with the analysis techniques.
Excel also integrates easily into other Microsoft
Office software products which can be helpful when
preparing reports or presentations.
5. What you can do with Excel
As a spread sheet, Excel can be used for data entry,
manipulation and presentation but it also offers a suite of
statistical analysis functions and other tools that can be
used to run descriptive statistics and to perform several
different and useful inferential statistical tests that are
widely used in business and management research.
In addition, it provides all of the standard spread
sheet functionality, which makes it useful for other
analysis and data manipulation tasks, including generating
graphical and other presentation formats.
Finally, even if using statistical software, Excel can be
helpful when preparing data for analysis in those packages.
6. Limitations of Excel
Excel does have limitations for statistical analysis.
It remains first and foremost a spread sheet package.
Inevitably it does not cover many of the more
advanced statistical techniques that are used in
research. More surprisingly, it lacks some common
tools (such as boxplots) that are widely taught in basic
statistics.
The extensive range of graph (chart) templates
is also criticised for encouraging bad practice in data
presentation through inappropriate use of colour, 3-D
display, etc.
Despite these limitations Excel remains a very
valuable tool for quantitative data analysis as you will
see.
7. Making the choice
Many basic analysis projects involving
primarily data exploration, descriptive statistics
and simple inferential statistics can be
successfully completed using standard Excel.
More advanced projects, especially those
involving multivariate analysis are more
challenging in Excel and in such cases it is
worth considering using specialist analysis
software such as IBM SPSS , MSTATC, SAS,
R, INDOSTAT, IRRISTAT etc.
8. Objectives
Identify the components of a spreadsheet.
Enter data into a spreadsheet.
Perform basic mathematical tasks in a
spreadsheet.
Insert charts in a spreadsheet.
Printing a spreadsheet.
Introduction to Excel Objectives
9. GETTING STARTED
To open Excel, click the Start button, point to All
Programs, point to Microsoft Office, and then click
Microsoft Office Excel 2007.
11. To work with a spreadsheet, you enter data in the cells of the
spreadsheet.
• You enter data by clicking a cell and typing the data.
• To replace data in a cell, you click the specific cell and type the
new data.
• To edit data in a cell, you double click in the cell and type
additional data.
Note: when editing data, a blinking cursor appears.
Working in a Spreadsheet
12. Working in a spreadsheet (cont.)
You can enter three types of data in a spreadsheet:
• Text: Text data has no numeric value associated with it.
• Numbers: A number has a constant numeric value, such
as the test scores attained by a student.
• Formulas and functions: Formulas and functions are
mathematical equations.
13. Enter Data
To ENTER data:
– click on the cell
– type information
– press ENTER.
The data can be both
number and text.
15. Cutting & Pasting data (cont.)
• To COPY contents of a cell:
– Click on the cell,
– Select the Home tab,
– Click Copy from the Clipboard
Group.
• To PASTE contents of a cell:
– click on the cell,
– Select the Home tab,
– click Paste from the Clipboard
Group.
16. Selecting cells
– To select a range of cells in a column/row, click the left
mouse button in a cell & drag the mouse pointer to
highlight the cells of your choice.
17. Adding rows & columns
• To INSERT a Row/Column:
– Select the row/column heading,
– Click the Home Tab,
– Click the Insert button from the Cells
Group.
• The insertion occurs before the
selected column/row.
18. Deleting Rows and Columns
• To delete a column/row:
– click the column/row heading
– click the Delete button on the Cells Group of the Home
Ribbon.
19. From a to z
• You may want to organize or rearrange data in your
worksheet. To sort data in the worksheet, click the
column heading and then click Sort & Filter in the
Editing Group on the Home Tab.
20. Editing spreadsheets
• To rename a worksheet:
– double-click the sheet tab
– type the new name
– press ENTER
• You can also Delete &
Insert a Worksheet as well.
21. Save your work
To save a workbook,
click the Office
button, click Save As
and choose how do
you want to save.
23. Formulas & functions
• The function =SUM(B1:B6)
• The formula =B1+B2+B3+B4+B5+B6
Excel reads any
expression that
begins with an
equal sign as a
calculation. All
functions and
formulas begin
with an equal
sign.
24. 24
Types of operations
• You can use any of the following operations in a
formula:
operation symbol example
addition: + =a1+3
subtraction: - =100-b3
multiplication: * =a1*b1
division: / =d1/100
exponentiation ^ =a2^2
negation - = -a2+3
(same symbol as subraction)
25. 25
Explicit (literal) values and cell references
• You can use both explicit values and cell
references in a formula
• An explicit value is also called a literal value
– Formula with only cell references: =a1*b1
– Formula with only literal values: =100/27
– Formula with both cell references and literal values:
=a1/100
26. 26
Order of operations
• When using several operations in one formula,
Excel follows the order of operations for math.
– first: all parentheses - innermost first
– second: exponents (^)
– third: all multiplication (*) and division (/). Do
these starting with the leftmost * or /
and work to the right.
– fourth: all addition (+) and subtraction (-). Do
these starting with the leftmost + or -
and work to the right.
27. 27
Please Excuse My Dear Aunt Sally
• The sentence "Please excuse my dear aunt Sally" is a
popular mneumonic to remember the order of operations:
Menumonic Meaning
– Please parentheses
– Excuse exponents
– My Dear mulitplication and division
(going left to right)
– Aunt Sally addition and subtraction
(going left to right)
30. 30
What is a function?
• A function is a "named operation"
• Functions have
– a name
– parentheses
– parameters/arguments inside the parentheses
• The words parameter and argument mean the same thing
• you can have many parameters for one function separated
with commas (,)
• The number of parameters is one more than the number of
commas.
31. 31
The SUM function
• Examples
Function Result
=SUM(1,2,3,4,5) 15
=SUM(a1,b1,c1) a1+b1+c1
=SUM(9,a1,b2,5,c1) 9+a1+b2+5+c1
32. 32
Terminology
SUM(1,2,3,4,5)
– The name of the function is "SUM"
– The parameters or arguments to this function are
1,2,3,4 and 5
– The entire thing, i.e. SUM(1,2,3,4,5), is a function call
– The value of this function call is 15.
Another way to say this is that this function call
returns 15.
36. How to Print Spreadsheet Data
To print a spreadsheet, click
the Microsoft Office Button,
point to Print, and then click
Print.
37. To specify the pages
that you want to print,
in the Print dialog
box, under Print
range, in the From
and To boxes, type
the pages that you
want to print.
How to Print Spreadsheet Data (cont.)
38. Ranges
• A rectangular box of cells is called a “range”.
• The name of a range is
– the name of the upper left cell of the range
– Followed by a colon :
– Followed by the lower right cell of the range
• Example: A1:B2 is shorthand for A1,A2,B1,B2
– See next slide for more examples
38
A1:B2
40. Quantitative data analysis tools in Excel
Excel includes a large number of tools that
can be used for general data analysis.
Here our primary concern is those that are
relevant to the statistical and related analysis .
There are four sets of tools are particularly
useful:
1. Statistical Functions
Excel offers a broad range of built-in
statistical functions. These are used to carry out
specific data manipulation tasks, including
statistical tests.
41. 2. Data Analysis ToolPak
The Data Analysis ToolPak is an Excel add-
in. It contains more extensive functions, including
some useful inferential statistical tests.
3. Charts
Excel’s in-built charts (graphs) cover most of the chart
types which are invaluable in data exploration and
presentation.
4. Pivot Tables
Pivot tables provide a way of generating summaries of
your data. They are extremely useful for creating
contingency tables, cross-tabulations and tables of means
or other summary statistics.
42. Setting up your data for analysis
Typically there are two options for getting your data into
Excel:
1. Import the data in a suitable format .
2. Enter the data manually in Excel file.
If you are going to enter our data manually use a
single worksheet to hold all the data in our dataset and set
up the worksheet with variables (questions) as the columns
and the cases (e.g. respondents) as the rows.
An individual cell, therefore, contains a respondent’s
answer to a specific question.
44. Using a worksheet to record details of dataset variables
45. Allocate column headers
In the first row, give each column a simple, informative
header that will be easy to understand .
Avoid just using question numbers (e.g. Q1, Q2, etc.) as these
can be confusing if you have a large number of questions. Instead,
use a simple naming system.
Allocate each case a unique ID
If they do not have one already, allocate each case in the
dataset a unique numerical identifier (ID). The easiest way to do
this is simply to number them consecutively from 1 through to n
(where n is the number of cases). For clarity, it is best to put the
ID as the first column in the worksheet. Giving each respondent a
unique ID aids in sorting and tracking individual responses when
(for example) cleaning the data or checking outliers.
46. Entering your data
Once the spreadsheet is set up, simply enter the data
into the appropriate cell as required. Numerical data can be
entered as numbers, other data, such as Likert scale data,
may need to be coded .
Enter the values as words (e.g. male/female),
appropriately abbreviated if required (e.g. m/f). Ensure
you are consistent in spelling and format as Excel will
treat each variation as a different value.
Enter the re-coded numerical values (e.g. 0/1 for
male/female), ensuring you keep a record in a code book
(Chapter 13). A worksheet in the workbook is a useful
place to record details of your variables and to store your
code book
47. Using Excel Statistical Functions
We have almost certainly used the Autosum (Σ) SUM
function which returns the sum of a range of cells, even if
you were not aware that it is only one of a suite of such tools.
In fact Excel includes a very large number of functions
covering a broad range of applications, including statistics.
Accessing functions
We can access the statistics functions in Excel via
Formulas > More Functions > Statistical which opens up a
menu of available functions.
We can then select the function you desire. It will be
inserted in the active cell so ensure you choose a destination
cell away from your dataset or your data will be overwritten
by the function output.
48. Excel’s Statistical Functions Menu
We can also access functions via Formulas > Insert Functions which opens up the Insert
Functions menu into which you can type the name of the function you want, select a
Category from which to choose, or use one of the functions listed in the Select a Function
window.
52. Preparing Excel for analysis
Before starting, check that your Data Analysis ToolPak
has been loaded or not ?. Do this by selecting the Data tab;
the Data Analysis command should appear in Analysis
group on the right-hand side of the ribbon (Figure 1). If it
does not do so, follow the procedures .
53. Using a function
We will introduce specific functions in the other
guides but the following example of applying the
AVERAGE function to calculate the mean age in the
sample dataset in Example.
Select the cell in which you wish the calculation to be
placed (Hint: if you are using the same worksheet as your
dataset, avoid cells that are immediately adjacent to your
data.
Select Formulas > More Functions > Statistical >
AVERAGE to open the Function Argument dialogue box
55. Select the range of cells to which the function should be applied.
56. Select OK. The result shows the arithmetic mean (AVERAGE) of the
chosen numbers (Hint: Type a descriptor of the function in an adjacent
cell so that you can remember what has been calculated ) as shown -
60. Using Functions in the Data Analysis ToolPak
We will introduce specific ToolPak functions -
Descriptive Statistics function on example to generate a
range of descriptive statistics for the variable age in the
sample dataset.
Select Data > Data Analysis to open the Data Analysis
menu dialogue box .
61. Select the desired function, in this case Descriptive
Statistics, which opens the relevant dialogue box .
In the dialogue box, enter the desired range in the
Input Range box. If you have included the column header,
select the Labels in First Row box.
Confirm where you want the output to go. The default
setting is New Worksheet Ply which creates a new
worksheet for the output; since most ToolPak outputs are
quite large, this is a sensible option.
Select Summary Statistics to get descriptive
statistics for your chosen data; you can also select an
appropriate confidence interval for the mean if desired (the
default is 95%).
63. Click OK. The output will be shown in a new worksheet (Figure
12). Note that here the column widths have been adjusted to make it
easier to read.
Descriptive Statistics output for variable Age
Note also that this output is not dynamically linked to the
original dataset so changes to the dataset will not automatically be
updated in the output. You will need to run a new analysis.
Once created, the output can be cut-and-pasted into word-
processing software for further editing.
79. Absolute and Relative Cell References
• By default, when you copy a formula that contains
a cell reference, excel will automatically adjust the
cell reference.
• You can stop Excel from automatically adjusting
the cell reference by using one or more dollar
signs ($) in the cell reference. These are called
absolute cell references.
• A cell reference without a dollar sign is a relative
cell reference.
79
80. Examples
• The following all refer to the same cell
d9
$d$9
$d9
d$9
• The only difference between these cell references
relates to what happens when you copy a formula
that contains the cell reference.
80
81. Relative Cell Reference
• d9 This is a "relative cell reference".
– Changing the column: If I copy this cell reference to
another cell:
• the "d" will increment one letter for every cell that I move
over to the right.
• The "d" will decrement one letter for every cell that I move
over to the left
– Changing the row: If I copy this cell reference to
another cell:
• the "9" will increment by one for every cell that I move
down.
• The "9" will decrement by one for every cell that I move up
81
82. Absolute cell reference
• $d$9 This is an absolute cell reference.
– If I copy a formula with this cell reference, the cell
reference will NOT change AT ALL.
82
83. Mixed References
• $d9 and d$9 - These are "Mixed" cell references:
• $d9 - The "d" will stay the same when you copy
the cell, but the "9" will change.
• d$9 - The "d" will change when you copy the cell,
but the "9" will stay the same.
83
84. Data Types• Numeric
– values: any number
– operators: + - * / ^ %
– sample functions: sum( ), average( ), max( ), min( ) etc.
• Text (AKA Character or String)
– values: Any group of letters or numbers or special characters.
Prefix value in cell with an apostrophe ( ' ) to force a text value
– operators: & (concatenation)
– sample functions: right( ), left(), mid(), lower(), upper(), len(), etc
• Dates
– values: dates and times
operators: N/A
– sample functions: now( ), today( ), hour(), minute(), etc.
• Logical (AKA boolean)
– values: true false
– Operators: < > = <> <= >=
– sample functions: if( ), and( ), or( ), not( ), isblank()
84
85. Data Types for Values in Cells
• By default:
– a cell that contains a number is treated as numeric data
– a cell that contains a date is treated as date data (we'll
see more about this later)
– a cell that contains data which is
not numeric and not a date is treated as "text"
85
86. Text / String / Character
• The following three terms all used to refer to
"text" data. All three terms mean the same thing.
– text data
– string data
– character data
• This presentation will generally use the term "text
data" but you should be familiar with the terms
"string data" and "character data"
86
87. Text data
• Text data is used to store general purpose text (e.g.
names, places, descriptions, etc)
• You can't do "math" with text values (obviously)
87