Excel

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

EXCEL: practical applications for CAP 121.

Version 1.3, by Peter Mkandawire

Excel is a spreadsheet program in the Microsoft Office system which you can use l to
create and format workbooks (a collection of spreadsheets) in order to analyze data.
Specifically, you can use Excel to track data, build models for analyzing data, write
formulas to perform calculations on that data, and present data in a variety of charts. The
distinguishing feature of a spreadsheet program such as Excel is that it also allows you to
create mathematical formulas and execute functions.

Ribbon

The excel ribbon has the following tabs:

 Home Tab
This is the most used tab; it incorporates all text and cell formatting features such
as font and paragraph changes. The Home Tab also includes basic spreadsheet
formatting elements such as text wrap, merging cells and cell style.
 Insert Tab
This tab allows you to insert a variety of items into a document from pictures, clip
art, and headers and footers.
 Page Layout Tab
This tab has commands to adjust page such as margins, orientation and themes.
 Formulas Tab
This tab has commands to use when creating Formulas. This tab holds an immense
function library which can assist when creating any formula or function in the
spreadsheet.
 Data Tab
This tab allows you to modifying worksheets with large amounts of data by sorting
and filtering as well as analyzing and grouping data.
 Review Tab
This tab allows you to correct spelling and grammar issues as well as set up security
protections. It also provides the track changes and notes feature providing the
ability to make notes and changes on a document.
 View Tab
This tab allows you to change the view of the document including freezing or
splitting panes, viewing gridlines and hide cells.
CELLS
Excel as a spreadsheet programs provides 16,384 Columns: A through XFD and 1,048,576
Rows: 1 through 1,048,576 Therefore making over 17 billion cells in each worksheet. A cell
is the intersection of a column letter and a row number. Each Excel file is a Workbook
containing one or more Worksheets and excel provides three worksheets, which can be
added or removed as needed. Several sheets can be used for one project, containing it all
in one file, or you can still use one file for each part of a project, depending on the need.

Reference Operators

Reference operators refer to a cell or a group of cells. There are two main types of
reference operators:
1. Range:
 . Refers to all of the cells between and including the reference.
 . Consists of two cell addresses separated by a colon.
 . EXAMPLE: ’A1:A3’ includes cells A1, A2, and A3.
 . EXAMPLE: ’A1:C3’ includes cells A1, A2, A3, B1, B2, B3, C1, C2, and C3.
2. Union:
 Includes two or more references.
 Consists of two or more cell addresses separated by a comma.
 EXAMPLE: ’A7, B8, C9’ refers to cells A7, B8, and C9.
 EXAMPLE: ’A7, B8:D9, E4’ refers to cells A7, B8, B9, C8, C9, D8, D9 and E4.

=AVERAGE (B2:C2) will give the same value as ’=AVERAGE (B2, C2)’

Excel can be used for data collection and entry, and even to use for some derivation of
other columns.Some examples of the types of calculations that can be done are: totals,
subtotals, average, and standard deviation.

FORMULAS AND FUNCTIONS

In Excel, the calculation can be specified using either a formula or a function. Formulas
are self-defined instructions for performing calculations. In contrast, functions are pre-
defined formulas that come with Excel. In either case, all formulas and functions are
entered in a cell and must begin with an equal sign ’=’.

Formulas can be created using numerous, and the common ones are listed below.

+ Addition =A7+A9
- Subtraction =A7-A9
* Multiplication =A7*A9
/ Division =A7/A9
ˆ Exponents =A7ˆA9
e.g. =B2+B3+B4+B5’
A formulae can also be copied from a cell to another cell (s) using the following procedure
 Select the cell with the formula you want to copy.
 Point to the fill handle.
 Move the fill handle to the last cell in the range.

Functions differ from regular formulas in that, after the equal sign, you supply the cell
addresses but not the arithmetic operators. Functions perform calculations by using
specific values, called arguments, in a particular order called syntax. When using a
function, the following are critical:

 Use an equal sign to begin the function.


 Specify the function name.
 Enclose all of the function’s arguments within parentheses.
 Use a comma to separate the function’s individual arguments.

e.g. ’=AVERAGE (B2, C2, D5, C1)’

In the above example, equal sign begins the function, AVERAGE is the name of the
function, B2, C1, D5 and C2 are the arguments, parentheses enclose all of the arguments
and commas separate each of the arguments.

Functions can be a more efficient way of performing mathematical operations than


formulas. Specifically, in many cases, a function will simplify formulas that you can type in
manually, such as average or sum. If you wanted to add the values of cells D1 through D10,
you could type the formula’=D1+D2+D3+D4+D5+D6+D7+D8+D9+D10’, or a shorter way would
be to use the SUM function and simply type ’=SUM (D1:D10)’.

The following table contains the definitions and examples of several other available
functions:
Function Example Description
SUM =SUM(A1:A100) FindsthesumofcellsA1throughA100.
AVERAGE =AVERAGE(B1:B10) FindstheaverageofthecellsB1throughB10.
MAX =MAX(C1:C100) ReturnsthehighestnumberfromcellsC1throughC100.Ret
MINSQ =MIN(D1:D100) urnsthelowestnumberfromcellsD1throughD100.Findsth
RTTOD =SQRT(D10) esquarerootofthevalueinD10.
AY =TODAY() Returnsthecurrentdate(leavetheparenthesesempty).
AUTOSUM

You can also use the Auto sumicon which automatically adds the contents of a cluster of
cells. Select the cell that the sum will appear in that is outside the cluster of cells whose
values will be added. Click the Auto sumbutton (Greek letter sigma). Highlight the group of
cells that will be summed.

To summarize values quickly, you can also use AutoSum.

 Select the cell where you would like the formulas solution to appear.
 Go to the Home tab, in the Editing group,
 Click AutoSum, to sum the numbers or click the arrow next to AutoSum to
 Select a function that you want to apply.

AUTOMATICALLY FILLING DATA

To quickly fill in several types of data series, you can select cells and drag the fill handle.
To use the fill handle, you select the cells that you want to use as a basis for filling
additional cells, and then drag the fill handle across or down the cells that you want to fill.
 Select the cell that contains the formula that you want to be brought to other
cells.
 Move the cursor to the small black square in the lower-right corner of a selected
cell also known as the fill handle. The pointer will change to a small black cross.
 Click and hold the mouse then drag the fill handle across the cells, horizontally to
the right or vertically down, that you want to fill.
 The cells you want filled will have a gray looking border around them. Once you fill
all of the cells let go of the mouse and the cells will be populated.
 Auto fill allows you to automatically fill cells with data based on a certain logic. This
tool uses the auto fillhandle, which is shown below and appears one or more cells is
selected. In order to auto fill, you must click and hold the auto fill handle and drag
to the adjust cell either left, right, up or down as necessary.
 Auto fill allows you to automatically complete mathematical sequences or series and
also predefined sets of numbers. You must select at least 2 cells in order for excel
to determine the relationship or common difference between the adjacent cell’s in
your data set. Given the spreadsheet below;

A B C D
1 10 20 TUE
2 15 15 FEB
3 20 Bunda
 Selecting cell A1 and auto filling in any direction will repeatedly result in 10s. This is
because excel has been supplied with only one cell and suggests that there is no
pattern whatsoever. This is similar to selecting cells A2 and B2 as auto filling to the
right or left will keep giving 15s since there is no difference between the values in
the two cells.
 Selecting cells and A1 and B1, then auto filling to cell C1 or further left will add 10
to the previous number. This is because excel determined that the common
difference/relationship between A1 and B1 is 10, hence the pattern must be to add
10, resulting in the numbers 30, 40, 50 and so on. This is similar to selecting cells B1
and B2 as auto filling downwards will result in a series were 5 is subtracted from
the previous number while dragging upwards will result in an addition of 5 to the
previous number.
 Auto fill also works on text. Certain text are keywords such that auto filling will
give a sensible sequence. For example, auto filling cell D1 to the right will give WED,
the THU and so on as the days of the week. This is similar to auto filling the same
cell downwards but the situation reverses when you auto fill to the left or upwards.
FEB is also a keyword and it will auto fill the months of the year. The “Bunda” is not
a keyword in excel, hence auto fill will simply result in many instances of the same
text.

Common Errors in Excel

There are so many types of errors in excel, the following five types are the most common
ones.

1. Cell width error (data length error)


Occurs when the data in a cell is too long (wide) such that it can’t be displayed all at
once in the cell. The error is represented by the occurrence of numerous #
symbols. It can be corrected by widening the cell until all the data is able to display
at once.

2. Invalid/wrong cell reference error


Occurs when an invalid cell is used in a formula or function. This could be that the
cell has been deleted or moved since it was last included as part of a formula or
function. The error is represented as#REF! And can be corrected by supplying a
valid cell reference.
3. Wrong/invalid value error
Occurs when a cell with an invalid value is used in a mathematical function or
formula. Wrong values are usually texts with no intrinsic mathematical value, e.g.
trying to add the number 20 to the word Bunda, or dividing a number by any other
letter of the alphabet. This error is represented as #VALUE!/ and can be
corrected by supplying a cell with a valid value.

4. Division by zero error


This occurs when a formula or function includes the number zero as a divisor, which
is mathematically wrong. The error is represented as #DIV/0! And can be
corrected by the exclusion of zero as a divisor.

5. Wrong/invalid function name


This error occurs when a wrong function name is used as is usually a result of
spelling errors, for example typing =averge(A1,A2) instead of =average(A1,A2) or
=SU(C3,C5,C6) instead of =SUM(C3,C5,C6). The error is represented as #NAME?
and can be corrected by supplying the correct function name.

Absolute and relative cell referencing

Relative cell references change with the row or column when auto filling whereas absolute
cell references remain the same regardless of being auto filled into a different row or
column. Given a the formula =B2+C6,

Auto filling to the right will consecutively change the columns as; =C2+D6 and then D2+E6
etc. This is the opposite of auto filling the same formula to the left, such that the cells
will now be going in the reverse order, but still not changing the row numbers. In essence,
the column names in the formula are changing as the cells changes, hence there are
relative to the opposition of the cell. The situation is similar when auto filling the same
formula downwards. Given the formula =B2+C6;

Auto filling downwards will result in =B3+C7 then B4+C8, etc. The column names do change,
only the row numbers change. The resulting change in formula is as a result of the cells
being relative; it changes with a change in the row.

Absolute cells do not change. A cell can be made absolute by applying the $ symbol to
either its column name, row number or both. Given the formula =$B$2+$C$6, auto filling
this formula in any direction does not change anything, i.e. it remains the same because the
cells are absolute. The formula =$B$2+C6 contains both absolute and relative cells hence
part of it will change and the other will not. Auto filling=$B$2+C6 downwards will give
==$B$2+C7, =$B$2+C8 and so on, hence only change the row number of the relative cell.
Auto filling=$B$2+C6 to the left will change to =$B$2+D6, then =$B$2+E6 etc.

What-if Analysis

The what-if analysis is a tool in excel which allows you to subject your data to various
conditional tests. It uses the “IF” function and it general format is represented as
=IF(LT,”TV”,”FV”) when entered in excel and the contents of the parenthesis are the
arguments of the function.

LT- this is the logic that you are using to condition your data e.g. is 100 >50?

TV-this is the outcome in case your logical test is true, it can be text or a mathematical
calculation.

FV- this is the outcome in case your logical test is false, it can also be text of a
mathematical calculation.

Given the following spreadsheet;

A B C
1 100 20
2 150 15
3 200
Entering the following functions in blank cells;

=IF(A1>B2,”correct”,”wrong”) means that the text “correct” should be displayed if the


value in cell A1 is greater than the one in B2. If the value in aA1 is not greater than the
one in B2, the logical test is not true thus the text “wrong” should be displayed because
that is our false value.

In the case of repetitive conditional testing, a slightly modifies format of the IF function.
Consider the example below of a spreadsheets of student’s grades

A B C D E
1 ID# MID END FINAL Pass/Fail GRADE
SCORE
2 001 10 40 50 Fail F
3 002 15 15 30 Fail F
4 003 20 70 90 Pass A
 Given that the pass mark is 60 and the grades are distributed as(A:90-100,B:80-
89,C:70-79,D:60-69,F:59-0)
 The final grades is calculated using the formulas =B2+C2, =B3+C3, =B4+C4
respectively
 The decision of whether it’s a pass or fail can be determined using the functions;
 For student 001, =IF(D2>60,”Pass”,”Fail”), and it will indicate “Fail” since the final
grade is below the pass mark.
 For student 002, =IF(D3>60,”Pass”,”Fail”), and it will indicate “Fail” since the final
grade is below the pass mark.
 For student 003, =IF(D2>60,”Pass”,”Fail”), and it will indicate “Pass” since the final
grade is below the pass mark.
 To determine the actual grade, the following functions can be used;
 For student 001, =IF (D2>89,”A”, =IF(D2>79,”B”, =IF(D2>69,”C”,
=IF(D2>59,”D”,”F”)))) and it will indicate F since it is less than 60.
 For student 002, =IF(D3>89,”A”, =IF(D3>79,”B”, =IF(D3>69,”C”,
=IF(D3>59,”D”,”F”)))) and it will indicate F since it is less than 60.
 For student 003, =IF(D4>89,”A”, =IF(D4>79,”B”, =IF(D4>69,”C”,
=IF(D4>59,”D”,”F”)))) and it will indicate A since it is greater than 90.

Data validation

This feature in excel allows you to validate the data that is entered into cells. Tis aspect
is essential in that it makes it possible for the user to be sure that the correct data is
entered and mistakes are avoided.

The data validation tool is a part of the data tab. To begin using this function, select the
cells you want to validate i.e. the cells where you want only particular data to be entered.
Go to the data tab and click on the data validation button were you will be presented with
the windows below:
In the settings tab, set your validation criteria i.e. the data type you want to be entering
using the drop down arrow on below the “allow” text. For example allowing whole numbers
will restrict you from entering decimals.

The “data” section asks you the choice of values you wish to use, hence you can restrict
whether values should be “less than”, “between”, “greater than” or other options as given
by the drop down arrow. For example, choosing greater than will make sure than you enter
only those numbers above the specified value.

Depending on the data value range chosen, you either set the maximum or minimum values
as necessary.

Charts.

The input message is text that you enter so that it gives a description of the data to be
entered into the selected cells. It cells no other value except as a descriptive reminder of
the required data and is displayed when you click on the cells of concern. It should contain
a title as well as the message body itself.

The error alert is the message that should be displayed in case an attempt is made to
enter wrong data. For example if you enter 20 in cells where the validation criteria was set
to be whole numbers greater than 50. The error message should have a title as well as the
message itself, and in addition it can be set as a “warning”, “stop” or “information” type of
a message.
CHARTS IN EXCEL

To create a chart in Excel, you start by entering the numeric data for the chart on a
worksheet. Then you can plot that data into a chart by selecting the chart type that you
want to use on the Insert tab, in the Charts group.

A chart has many elements. Some of these elements are displayed by default, others can
be added as needed. You can change the display of the chart elements by moving them to
other locations in the chart, resizing them, or by changing the format. You can also remove
chart elements that you do not want to display.

1. Worksheet data
2. Chart created from worksheet data

1. The chart area is the entire chart and


all its elements
2. The plot area is the area of the chart
bounded by the axes.

3. The data points are individual values


plotted in a chart represented by
bars, columns lines, or pies.
4. The horizontal (category) and vertical
(value) axis along which the data is
plotted in the chart.
5. The legend identifies the patterns or
colors that are assigned to the data
series or categories in the chart.
6. A chart and axis title are descriptive
text that for the axis or chart.
Create a Chart

 On the worksheet, arrange the data that you want to plot in a chart. The data can
be arranged in rows or columns — Excel automatically determines the best way to
plot the data in the chart.
 Select the cells that contain the data that you want to use for the chart. If the
cells that you want to plot in a chart are not in a continuous range, you can select
nonadjacent cells or ranges as long as the selection forms a rectangle. You can also
hide the rows or columns that you do not want to plot in the chart.
 Go to the Insert tab, in the Charts
 Click the chart type, and then click a chart subtype from the drop menu that will
appear.
 Click anywhere in the embedded chart to activate it. When you click on the chart,
Chart Tools will be displayed which includes the Design, Layout, and Format tabs.
 The chart will automatically be embedded in the worksheet. A chart name will
automatically be assigned.

Change Chart Name

 Click the chart.


 On the Layout tab, in the Properties group, click the Chart Name text box.
 Type a new chart name.
 Press ENTER.

Change Chart Layout

 Click anywhere in the chart.


 Go to the Chart Tools, the Design group
 In the Chart Layouts, click the chart layout that you want to use. To see all
available layouts, click

Change Chart Style

 Click anywhere in the chart.


 On the Design tab, in the Chart Styles group, click the chart style that you want to
use. To see all predefined chart styles, click More

Chart or Axis Titles

To make a chart easier to understand, you can add titles, such as chart and axis titles.
To add a chart title:
 Click anywhere in the chart.
 On the Layout tab, in the Labels group, click Chart Title.
 Click Centered Overlay Title or Above Chart.
 In the Chart Title text box that appears in the chart, type the text that you want.
 To remove a chart title, click Chart Title, and then click none. You can also use the
formatting buttons on the ribbon (Home tab, Font group). To format the whole
title, you can right-click it, click Format Chart Title, and then select the formatting
options that you want.

To add axis titles:


 Click anywhere in the chart.
 On the Layout tab, in the Labels group, click Axis Titles.
 Do one or more of the following:
o To add a title to a primary horizontal (category) axis, click Primary
Horizontal Axis Title, and then click the option that you want.
o To add a title to primary vertical (value) axis, click Primary Vertical Axis
Title, and then click the option that you want.
 In the Axis Title text box that appears in the chart, type the text that you want.
 To remove an axis title, click Axis Title, click the type of axis title to remove, and
then click none.

Data Labels

 On a chart, do one of the following:


o Click on the chart area to add a data label to all data points of all
 data series
o Click in the data series to add a data label to all data points of a
 data series
o Click on a specific data point to add a data label to a single data
 point in a data series
 On the Layout tab, in the Labels group, click Data Labels, and then
 Click the display option that you want.
 Text boxes will appear in the area of the chart based on the selection.
 Click on the text box to modify the text.
 To remove data labels, click Data Labels, and then click none.

Legend

When you create a chart, the legend appears, but you can hide the legend or change its
location after you create the chart.
 Click the chart in which you want to show or hide a legend.
 On the Layout tab, in the Labels group, click Legend.
 Do one of the following:
o To hide the legend, click none.
o To display a legend, click the display option that you want.
o For additional options, click More Legend Options, and then select the
display option that you want.

Move or Resize Chart

You can move a chart to any location on a worksheet or to a new or existing worksheet. You
can also change the size of the chart for a better fit. To move a chart, drag it to the
location that you want.
To resize a chart, click on one of the edges and drag towards the center.

You might also like