Académique Documents
Professionnel Documents
Culture Documents
Inside
Overview ……………………………………………………………………….………..3
Chapter 1 – Mathematical Principles and Basic Formulas………………………..…4
Creating a Formula ………………………………………………….……….…..……..4
Copying a Formula………………………………………………………………….…..6
Using Relative Cell References…………………………………………………………6
Using Absolute Cell References…………………………………………………..…….7
Using AutoSum ………………………………………………………………………...8
Overview
This course material on Excel 2000 has been developed specifically for The Sak.
Formulas
A formula is an equation that performs operations on worksheet data. Formulas can
perform mathematical operations, such as addition and multiplication, or they can
compare worksheet values or join text. Formulas can refer to other cells on the same
worksheet, cells on other sheets in the same workbook, or cells on sheets in other
workbooks. We will learn how to use and create simple formulas using Relative and
Absolute cell References and copying formulas.
Functions
We are also going to learn about functions and how to use them. Functions are
predefined formulas that perform calculations by using specific values, called arguments,
in a particular order, or structure. We will learn how to use basic functions using the
Paste Function as well as, using nested functions, revising formulas, and using date
functions.
PivotTables
Finally, we will learn how to create PivotTables. A PivotTable report is an interactive
table that you can use to quickly summarize large amounts of data. We will learn how to
create a PivotTable including, setting up the layout, refreshing PivotTable data, using
AutoFormat, Filtering data, and Calculating data.
Creating Formulas
! Before getting started, it is important to understand that the operations that are
performed in Excel follow the basic math principles that govern calculations. That
means, Excel will perform any operations in parentheses first, then exponents will
be calculated followed by any multiplications and division. The final calculations
that are performed in a formula are additions and subtraction.
Operator Function
+ Addition
- Subtraction
* Multiplication
/ Division
^ Used for Exponents
% Is used when entering numbers in a
formula to calculate percentages.
Let’s start by looking at the first example. This file contains a list of employees, their
hourly wage, and total hours worked. We are going to complete the last column which is
the wages earned.
This involves multiplying the hourly wage by the number of hours worked.
Let’s start by selecting cell D4
To begin the formula let’s type an equal sign.
Now we reference the cell that we want to calculate. Do this by typing: B4
followed by an asterisk * then C4. Once you are done, the formula should look
like this: =B4*C4
With the formula created, press Enter to perform the calculation.
Copying Formulas
Once we have created a formula, it can be copied and pasted into other cells so we can
perform similar calculations. When we copy a formula, Excel automatically adjusts the
cell references according to where it is pasted. Copying a formula creates a Relative Cell
reference and updates the formula so it can be used to calculate values that are located in
different areas of a worksheet.
Let’s see how Excel creates Relative cell references when we copy a formula to a
different location:
Copy the formula from cell D4 so we can calculate wages for the remaining
employees. Select cell D4 and use the Ctrl+C shortcut to copy.
Now select cells D5 through D12 by dragging over them. Type Ctrl+V shortcut
to paste the formula.
Relative References
The copied formula has been adjusted to calculate the cells in each row. This is how
Relative references are created. In the example below, a Relative cell reference has been
created and each answer in column D uses the data in its own row to calculate the wages
for each employee.
The worksheet below contains a list of employees and their sales. We will create a
formula to calculate each person’s commission based on the commission rate value in
cell C2.
Select cell C5, start by typing an equal sign to begin the formula.
Now click on cell B5, then type an asterisk to multiply, then select cell C2. So far
the formula should look like this: =B5*C2
Now we’ll want to use cell C2 for all the other calculations on this column so
we’ll make cell C2 an absolute reference by pressing the <F4> key. Once we do
this, a dollars sign is placed in front of the column letter and row number for the
C2 cell reference. Now the formula should look like this: =B5*$C$2
When you are ready to calculate the results press the Enter key.
By making the cell reference for C2 absolute, we can copy the formula and each person’s
commission will always be calculated using the value in cell C2.
To quickly add the columns on the example below, select the range of cells where
we want to insert the totals.
Click the AutoSum button that is on the Standard toolbar. Once we hit the
AutoSum button, totals are automatically calculated on each column.
If you look at cell B14 you’ll see on the formula bar that like all formulas, the function
begins with an equal sign. This is followed by the function name and the argument is
enclosed in parentheses. In this case the argument refers to the range of cells that is being
calculated.
=SUM(B4:B13)
The worksheet below displays students and their test scores. The first we’ll do is to
figure the average score of each student. To do this we’ll use the AVERAGE function.
First we’ll select cell F3 so we can insert the function and average of the values in
cells B3 through E3.
Now we’ll access Excel’s list of functions by clicking the Paste Function button
in the Standard toolbar. Once we do this, the Paste Functions window displays.
Highlight AVERAGE from the Function Name list. Click the OK.
Now we simply specify the values we want calculated. When performing basic
functions a range of cells maybe suggested for the argument. When we use the
Formula Palette, the fields being displayed in bold text are required arguments be
that must entered for the formula to work. Once the cell, or range of cells has
been selected, click OK to calculate the formula.
The average score is calculated as ninety-five and is entered into cell F3.
Revising Formulas
If we make an error while entering a formula or simply want to make changes to it, it’s
not big deal. We can easily edit a formula. For example, let’s say we wanted to count
the final test scores as two tests.
To create an average for the remaining students, we’ll simply copy the formula.
Overall Average
Select the cell where you want to place the calculated formula.
Press the Paste Function button.
When the Paste Function panel appears, select Most Recently Used option
from the Function Category List and press the OK button. The Formula
Palette displays.
When the Formula Palette displays, it will insert a suggested range that you want to
calculate. If you want to select a different range of cells, you may do so by pressing the
collapse button on at the end of every field.
Collapse Button.
Collapsed
Formula
Palette
When the Formula Palette displays, click on the collapse button so we can
select the range of cells we want to calculate.
When we are ready to calculate, we’ll expand the Formula Palette and press
the OK button. The cell formula is calculated.
The data in the worksheet below shows expense projections that are anticipated for a 5-
day vacation. The goal here is to find out if our daily expenses are within the budget of
$600 dollars. We’ll use the SUM function along with a comparison operator to find
anything out of our budget.
Select cell B12 so we can enter the formula and calculate the first column.
Type an equal sign and then SUM followed by a left parenthesis.
Now we’ll reference the cells by dragging B4 through B10 the type a closing
parenthesis.
To complete the formula type a less then sign and 600.
The formula should look like this:
=SUM(B4:B10)<600
With the formula created, press Enter. The word TRUE will appear on the
cell.
When we release the mouse, each column is calculated. As we can see all of the days
except for one are within our budgeted amount.
Function Arguments - Arguments can be numbers, text, logical values, arrays, error
values, or references. Arguments can also be constants or formulas, and the formulas can
contain other functions. When performing more complex calculations, a function may
include something we call a Nested Function. A nested function is a function that is
used as an argument within another function. We can nest up to seven levels of functions
in a formula.
In the example below, the IF function contains three arguments that are enclosed in
parentheses. A comma is used to separate each argument. Remember that arguments are
the values a function uses to perform a specific operation or calculation.
=IF(B5>SUM(A1:A4),”YES”,”NO”)
* In the first argument we have a nested function that adds a range of cells then
compares it with the value in cell B5.
* The second and third arguments are text. Anytime we use text in a formula or as a
function argument; it must be enclosed in quotation marks.
Using VLOOKUP
This function can be used to quickly find a value in the leftmost column of a table or list
and match it with a value in the corresponding row from a column we specify. The
values in the first column can be text, numbers, or logical functions. The Lookup
command stops when it reaches a higher value than the one we’re looking for so it’s
important to sort the data in ascending order according to the entries in the leftmost
column.
In the example below, we have a UPC that we want to associate with an Item Id. Instead
of scrolling down and looking for the UPC number, we’ll create a VLOOKUP formula to
look for the Item Id.
We’ll start by selecting cell C1 and press the Paste Function button.
Find and highlight the VLOOKUP function from the list of functions.
The arguments we need to enter are now displayed in the Formula palette.
Lookup_value – The Lookup_value is the value or number that we want to use for the
search. We’ll type the UPC number here.
Table_array – Here we enter the argument or table array. Press the collapse button on
the Table_array field and select columns A and B.
Col_index_num – In this field we want to match the reference number we enter for the
value with an Item Id so we’ll enter the 2 for the second column on the array.
Range_lookup – Type False to find exact match otherwise leave blank.
Press Enter to calculate the formula. You can see the formula in the Formula bar.
To determine the number of days between two dates in a normal year, we can use
regulars subtraction.
Example:
=”01/31/03”-“01/24/03”
In the Logical_test field, we’ll enter the date returned cell reference that is
minus or equal to the due date cell reference. What we have just entered for
the logical test argument, will compare the two dates in cells D5 and C5 so we
can see it the book was returned on time.
Now we enter the final two arguments. These determine what will happen if
the statement is true and what will happen if it’s false. We can enter the text
true and false for each argument, or we can enter our own values for these
arguments. If this statement is true and the book has been returned on time,
we want to see the text No Charge.
Now you are ready to copy the formula down to the other rows. The results show which
books were late and how much the late charges are.
In the worksheet below, we’ll apply a conditional format to column D. We’ll used
conditional formatting to display all overdue charges in red text. To begin, we’ll select
D3 to apply conditional formatting to this cell first.
Next, we open the Format menu and select Conditional Formatting command.
The Conditional Formatting dialog box allows us to enter the conditions that will
determine whether formatting is applied to a cell.
Let’s click the drop-sown arrow for the first box. Here we see two options-
Cell Value Is and Formula Is. With the first option, formatting can be
applied based on the contents or value in the selected cell. The Formula Is
option is used to apply conditional formats based on the results of a formula.
Keep in mind the formula we enter must return a true or false value result.
Let’s select the formula option.
In the next box, we enter the formula for the condition. Let’s start by typing
an equal sign and cell D3. Then we type a not equal to sign. Now we type
the remaining part of the formula in quotation marks – “no charge”.
The formula we just entered will only apply a format to cell D3 if it does not contain the
text “No Charge”.
Since cell D3 contains a value other that “no charge”, it is now displayed with red text.
Use the format painter to apply this format to all the other values in the same column.
Creating PivotTables
The best way to understand the power of a Pivot Table is to jump right in and create one
of our own. The worksheet below contains all contracts booked for the month of May
including, Customer Name, Contract #, Item Group, Family Group, Total Units, Total
Dollars.
From the File menu, select Data then select PivotTable and PivotChart Report from
the list.
Step 1
The data we’re going to analyze with our PivotTable is contained in a
Microsoft Excel list so let’s keep this option selected.
Then we choose whether we want to create a PivotTable or a PivotChart with
an associated PivotTable. Let’s keep PivotTable Selected and click Next.
Step 2
In step two, we specify the range of cells we want to use in the PivotTable.
Excel wizard automatically selects for us but if we wanted to select a different
range of cells, we could do so. Click Next.
The AutoFormat dialog box opens. It offers various types of report and table styles.
Each will apply a distinctive format. If we choose from one of the ten report available
styles, the data will be indented and the column fields are automatically moved to the row
area. The table style options will also apply a distinct format.
Summarizing
Now let’s suppose we want to create a separate worksheet that summarizes all of the
details for video sales. This is as easy as pointing and clicking the mouse. All we have
to do is locate the Grand Total and double click in that cell.
Show Pages
Next, we are going to learn how to use the Show Pages command to create separate
worksheets that display different summaries for the pivot table data. This technique can
be very helpful when we wan to print summary reports showing specific details, such as,
sales figures for various divisions or regions.
To demonstrate we’ll click the first button in the pivot table toolbar.
Select the show pages command from the list.
The show pages dialog box appears and the item group field is currently displayed
here.
With the item group highlighted, click OK. In just a matter of seconds excel will
create a new worksheet for each sales region with its own pivot table.