Excel 2007 Part 2 Instructor Outline

advertisement
EXCEL 2007
PART 2
INSTRUCTOR OUTLINE
Excel 2007 Part 2 Instructor Outline covers working with cell ranges, understanding data
formats, making formulae, sorting and filtering data, etc.
2/15/2012
1 of 14
Excel 2007 Part 2
WORKING WITH CELL RANGES
1.
2.
3.
4.
New blank workbook = play around
Selecting cell ranges
a. Click-and-drag method
b. Shift-click method
c. Shift-arrows method
Naming cell ranges
Selecting non-adjacent cells
CELL DATA FORMATS
1.
2.
3.
4.
5.
All data in your excel worksheet is a number (at heart), regardless whether you are looking at a date,
a %, money, etc. The ONLY EXCEPTION IS TEXT.
Excel tries to guess, based on what you type in each cell, what kind of data you are putting in.
[[OPEN A NEW WORKBOOK, TYPE 10 IN CELL B3]]
Now, let’s change data type using the drop-down box on Home  Number. The default is general
(guessed format). LOOK AT THE DROP-DOWN, YOU CAN SEE A PREVIEW!!!!
a. Number: this is the basic format for numerical data. You can increase or decrease the
number of decimal places by using the decimal increase/decrease buttons on Home 
Number
i. Many options available (including options for how to display negatives)
b. Currency: uses a standard decimal place setting (2) and adds $ to front (can use different
currency types)
c. Accounting: uses a standard decimal place setting and adds $ to front… also aligns decimal
places and currency symbols in the same column (try it… at $10,000.00 in B4)
d. Short date: interprets the numerical value as a date in mm/dd/yyyy format. 1/1/1900 is 1
e. Long date: interprets the numerical value as a date in DAYNAME, Monthname dd, yyyy
format
f. DATES HAVE MANY OPTIONS FOR DISPLAY
i. [[pull open the full format menu – number tab… scroll through the different date
formats ]]]
g. Time: switching your numeric data to a time uses the fraction as the time (fraction of a day)
i. [[WHAT WOULD THE DECIMAL HAVE TO BE TO HAVE A TIME OF 12:00 pm?]]
h. Percentage: converts the value as typed to a %
i. Fraction: displays the value as a fraction
j. Scientific: YY x 10^??
k. Text: turns whatever you have into text (even if it looks like a number)
l. Others in the menu:
i. Special: zip code, social security number, etc.
You can control the data type selected by Excel by typing values in different formats try typing this:
a. $10
b. 1/10/2012
c. 1:10 pm
d. $10.00
© 2012 Michael J. Walk
2 of 14
Excel 2007 Part 2
6.
e. 1E4
f. 10 ½
g. 10%
h. ’10 (converts number to text)
EXERCISE 1 (CHANGING DATA FORMATS) -- need online file only
SORTING
1.
2.
3.
4.
5.
6.
7.
8.
9.
Many times we have a lot of data that we want in a particular order. Sorting allows us to do this.
If we have multiple columns of data (e.g., a table), we can sort that entire table for 1 or more
columns.
Create a new empty workbook. In column A, type a column name of “Sort Test” and then type
the letters a through I in the cells below—one letter per row.
To sort your data, simply make sure you have clicked in one of the cells, then use the sort button
on Home  Editing  Sort &Filter  Sort Z to A (this is descending).
a. By default, the sort function sorts all data adjacent to the selected column and assumes
your data has a header row.
Let’s do this again, but instead, select Custom Sort. De-select the “my data has headers” and
then sort the data. See what happens (Sort Test is included in the list of data to sort). UNDO
ADD a column called Num Col, and put the numbers 1 – 9 in it (1 should be in same row as A)
PUT cursor in Num Col, do a Custom Sort and make sure the “my data has headers” box is
selected. Sort Num Col in descending order (largest to smallest). WHAT DO YOU SEE? – Excel has
sorted the entire table of data based on the value of Num Col (1 is in the same row as A still).
[[treats each row as a case or a record of data]]
TO SORT ONLY THE SINGLE COLUMN : select the column you want to sort alone. When you select
the sort, you will be asked whether you want to expand the selection or not.
a. OR, put space between the column you want to sort and the rest of the data
b. INSERT column between Num Col and Sort Test. Then, try to sort the Num Col. See what
happens.
EXERCISE 2 (sorting data)
a. May 1998, Feb. 1999, June 2000
b. Aug. 98, May 99, Sept. 99
c. Jan 98, Jan 2000, Nov 98
d. 456, 487, 765
FILLING SERIES
1.
2.
We often want to fill cells with a pattern of values. For example, simply counting up by 1 is
useful. Or, we may want to create a list of weeks or months. Rather than typing them in
individually, we can use Excel’s fill series feature. This is done in one of two ways:
Using the fill handle
a. OPEN A NEW WORKBOOK and type 1 into cell A1
b. Place mouse over lower right corner of cell – get the cross-hair pointer – click and drag
down
c. What happened? Copied the cell values.
d. Try dragging cell A1 fill handle to the right. – same thing
© 2012 Michael J. Walk
3 of 14
Excel 2007 Part 2
e.
3.
4.
**[[The fill handle fills the selected pattern. Since only one cell selected, there is no
pattern.]]**
f. Erase all the values except the first 1…. Add a 2 under the one. Select both cells, and use
the fill handle and drag down.
g. Add a 2 to the right of the 1…. Select both and fill to the right
h. Erase all values. Change the 1 to a 10 and then add a 20 below the 10.
i. Use the fill handle to drag down. What happens?
i. Erase all values. Type today’s date. In the cell below, type the date a week from now.
Use the fill handle. What happens?
j. Erase all values. Type in Jan. 1, 2012. Cell below = Feb. 1, 2012. Use fill handle
k. Erase all values. Type in “Item 1” Cell below = “Item 2”. Use fill handle
Using Fill Series
a. Sometimes you have a lot of filling to do… like, number the rows from 1 to 10,000.
Dragging the fill handle can take a long time.
b. Type first value in cell. Select cell. Home  Editing  fill  Series…
i. Determine whether you want to fill down the column or across the row.
ii. Select an increment value
iii. Enter your ending value
iv. OK
EXERCISE 3: CREATE A DATA WORKSHEET (follow instructions in handout)
THE AUTO CALCULATE FEATURE
This feature displays information, on the Status Bar, on a highlighted range. Right-Click on the Status Bar
to activate the Auto Calculate features.






Sum
Average
Count
Numerical Count (ignores cells with text)
Minimum
Maximum
Start from a blank New worksheet.
Type a column of any five numbers in Column A.
Highlight your range of numbers.
View the Status Bar on your screen. Across the bar, on the right, you will see displayed the Auto Calculate
information about your range.
INTRODUCTION TO FORMULAS
1.
2.
Reason formulae are useful: Allow us to make cell values that are interactive (not just static).
These formulas can be based on the values of other cells or on mathematical calculations.
Formulas are created in a cell by starting the cell with =
© 2012 Michael J. Walk
4 of 14
Excel 2007 Part 2
3.
4.
5.
6.
7.
8.
9.
Two kinds of formulae – independent (no external cell references) and dependent (use values in
other cells)
Create new blank workbook
Basic math symbols are: *, /, +, -, ^, ()
Excel also have built-in formulas for complex math (SUM, AVERAGE, STDEV, MAX, MIN, etc.)
Basic independent formula: how many seconds in a week?
a. How many seconds are in a week? =7*24*60*60
Dependent
a. Calculate seconds as a in X days
b. 2 cells needed  one that holds the days, one that will calculate the seconds
c. =cell*24*60*60 [[WALK THROUGH HOW TO REFERENCE AN EXTERNAL CELL IN A
FORMULA]]
Play with this by changing the number of days values
ORDER OF OPERATIONS IN FORMULAS
Excel calculates formulas in a specific sequence (a set of rules). This is called the Order of Operations. The
Order of Operations works as algebra works, by calculating the elements of a formula in this order:
1.
2.
3.
4.
Parentheses: Any computation within parentheses is performed first, inner parentheses to outer
parentheses.
Exponents: Any computation involving an exponent is performed next. If there is more than one
exponent in a formula, Excel calculates them in order from left to right.
Multiplication or Division: These operations are performed next, in order from left to right.
Addition or Subtraction: These operations are performed last, in order from left to right.
*Note: Within parentheses, Excel also follows the Order of Operations, working from left to right.
Remember the Order of Operations with this sentence:
Please Excuse My Dear Aunt Sally.
Follow the example for a clearer picture:
=(20/4) * 100 + 15*2^2
Steps to follow in the order of operation:
1. 20/4 = 5
5*100 + 15 * 2^2
2. 2^2 = 4
5*100 + 15 * 4
3. 5*100 = 500 & 15*4 = 60
500 + 60
4. 500 + 60 = 560
560
Practice with the Order of Operations
=1+2*3+4/5-6
=1*2+3+4/5-6
© 2012 Michael J. Walk
5 of 14
Excel 2007 Part 2
=1*2*(3+4)/5-6
=1+2^2*4-6
=(1+2)^2*4/6
=(1+2*3)/5*(6-7)
=1+2*2-2*-1+2/2^2
=1+(2*2-(2*-1)+2)/2^2
=1+(2*2-(2*-1))+2/2^2
=1-(1256.78+45/908.22^(4-8.5))*0
=1/0
DEPENDENT (REFERENCE-BASED FORMULAS)
Now let’s try the same example with cell references. Use the file Formula Practice to get the average
figures for Last Year Totals
=((B11 + C11 + D11 + E11)/4)/12
Steps to follow in the order of operation:
1. 7232 + 6434 + 9089 + 5824 = $28,579
(28,579/4)/12
2. 28,579/4 = 7,145
7,145/12
3. 7,145/12 = 595
595
1.
EXERCISE 4 (creating a method to calculate the total)
INTRODUCTION TO FUNCTIONS
Functions begin with an equals sign (=) and include the function name or an abbreviation of that name
and the data range or arguments, enclosed in parentheses.
For example:



=SUM(A2:E12)
=AVERAGE(A2:E12)
=MIN(A2:E12)
Functions can be entered in at least two ways:

Type the entire function directly into the cell manually.
© 2012 Michael J. Walk
6 of 14
Excel 2007 Part 2

Type the function name and the left parenthesis, then use the mouse to select the range,
separating multiple ranges with commas.
Open File FUNCTION PRACTICE.
1.
Select B8 and type =SUM(B2:B7); press Enter.
or
2.
Select C8 and type =SUM(
3.
With your mouse, select C2 through C7. As you highlight, Excel enters the range into your formula.
Press Enter.
Using either of these two methods, write the formulas for AVERAGE, MIN, and MAX to complete the
worksheet.
COMBINING RANGES IN A FORMULA
1.
In cell A14, type Total Points.
2.
In cell B14, type =sum(
3.
Highlight B2:B7
4.
Enter a comma after this range.
5.
Highlight C2:C7. Enter a comma.
6.
Highlight D2:D7. Enter a comma.
7.
Highlight E2:E7.
8.
Press Enter.
Note: To see a list of all Excel Functions, go to the Functions Library tab under the Formulas category.
USING FORMULAS ACROSS WORKSHEETS
You can have the answer to a formula appear in other cells or in other worksheets:
1.
Add a Sheet 2 to your workbook.
2.
Go to Sheet 2, Cell A1.
3.
Type =Sheet1!B10.
4.
Select Sheet 2, Cell A2.
5.
Type =Sheet1!B8+Sheet2A1.
© 2012 Michael J. Walk
7 of 14
Excel 2007 Part 2
You can also combine functions from different worksheets, apply a new function, and place the answer on
another worksheet.
1.
Add a Sheet 3 to your workbook.
2.
Select Cell A1.
3.
Type =SUM(Sheet1!B2:B7)-AVERAGE(Sheet2!A1:A2).
Note: Sheet references follow this format: (Sheet Name; !) You may also highlight ranges instead of typing
them.
AUTOSUM
1.
Delete the totals from the previous exercise.
2.
Place the active cell where you want an answer.
3.
Click the AutoSum button.
4.
Repeat the process for all of the remaining columns, using Average, Minimum, and Maximum.
Note: Notice that Excel guesses the entire column above your formula for Average, Minimum, and
Maximum incorrectly. Use your mouse to select the correct range.
COPYING AND PASTING FORMULAS
1.
Delete the totals from the previous exercise.
2.
Calculate a Sum in B8 using the method of your choice. Press Enter.
3.
Copy this cell, highlight C8:E8, and Paste.
You may also use the Fill Series Feature to copy and paste formulas:
1.
Calculate an Average in B10 using the method of your choice. Press Enter.
2.
Select this cell, and using the Fill Series Handle, drag the cell into C10:E8.
ABSOLUTE AND RELATIVE CELL REFERENCES
You may have noticed that when you copy a formula or function from one cell to another, Excel converts
the cell reference to correspond to the row or column you have copied the formula or function to. For
example, if you were copying the function =SUM(A1:A5) from cell A6 to cell B6 the formula would read
=SUM(B1:B5) because it would adjust the cell references automatically. Therefore, any cell reference is a
Relative Cell Reference.
There may be times when you don’t want relative cell references when copying formulas.
Open File ABSOLUTE REFERENCE
© 2012 Michael J. Walk
8 of 14
Excel 2007 Part 2
1.
Calculate the first employee’s total salary in E9 using the formula =(C9*D9)*B3
2.
Use the Fill Handle to copy this formula into the rest of the column.
Note that the formula carries over the Relative Cell References for all cells, for example, =(C10*D10)*B4.
This is not what we want.
This is an incorrect
answer.
4. Delete the contents of cell E10 because we do not want to pay this employee the OT Rate for 39
hours of work.
5. Select cell E9. Go to the Formula Bar and place your cursor before B3. Notice that Excel will highlight
all cells in the formula.
5.
Press the F4 key. This is the Absolute Reference key. It inserts the $ to indicate an Absolute Cell
Reference automatically.
6.
The formula now contains the Absolute Cell Reference $B$3 in the formula rather than the Relative
Cell Reference B3.
7. Press Enter
8. Copy this formula into the remaining cells in the column. Notice the correct answers, based on the
formula with the Absolute Cell Reference.
Sometimes you want to the cell reference to have an absolute ROW or COLUMN but not both.
Open the file: Absolute Rows Columns
1) We want to calculate the weekly wages for each employee as well as the total hours per
employee and per week.
© 2012 Michael J. Walk
9 of 14
Excel 2007 Part 2
2) Let’s start by adding the total hours per employee, per week, and grand total. BE SURE YOU
DON’T CHANGE THE COLORS OF THE CELLS!!!
3) Start by writing the formula for employee 123, hours for week 1 * hourly wage for 123 * wage
rate.
4) Rather than writing 30 different formulas, we want to write one that we can use to calculate the
$$ for every employee.
5) Which of the three cell references do we want to keep fixed no matter what?  wage rate (f4)
6) What about the per-employee hourly wage? What do we want to happen?  Drag down is OK,
but dragging to the right is not OK  absolute column and relative row
7) What about the hours worked per employee per week?  relative reference OK
8) Now drag the formula to all weeks, all employees
AUTOMATIC AND MANUAL RECALCULATIONS
Automatic Recalculation of formulas is the default method used by Excel. When you change a cell entry,
the formulas that depend on that cell will automatically update.
Open file AutoCalculate.xls
Calculate the Sum for the first column.
Enter the value 100 into cell B3.
Notice that the formula updates to the correct answer.
If you are working on a large worksheet, could take Excel 5-20 minutes or more to recalculate all formulas
on the sheet every time you enter date into one cell.
If you are working in an Excel workbook that has many complex formulas that are taking too long to
calculate, and thus are slowing your work, it’s helpful to turn off the Automatic Calculations feature.
Under the Formulas category, find the Calculations tab and select Calculation Options.
Select Manual.
Your formulas will now not automatically recalculate.
Select Calculate Sheet from the Calculations tab or Calculate Now if you want to recalculate the entire
workbook.
CREATING CHARTS
Open File CHART PRACTICE.
Practice 1
1.
Select B2:B6.
© 2012 Michael J. Walk
10 of 14
Excel 2007 Part 2
2.
On the Charts tab, under the Insert category, select Line.
3.
From the list, under 2-D Line, select the first chart, Line.
4.
Under Chart Tools, select Layout, and then, in the Labels section, click Chart Title choose Above
Chart. and type Report.
5.
Select the axis lables
6.
Add axis titles
7.
Remove the legend
8.
Select the entire chart and resize it using the Resizing Handles (4-headed arrows.)
9.
By Right-Clicking on the various elements of the chart and selecting the Format options, you can
customize the formatting for the chart.
Practice 2
1.
Select G2:G6.
2.
On the Charts tab, select Column.
3.
From the list, under 2-D Column, select 2-D Clustered Column.
4.
Add a title, axis labels, axis titles
Practice 3
1.
Select B2:B6.
2.
On the Insert tab, select Pie.
3.
A basic 2-D pie usually suffices
4.
Under Design, change chart layout so that % and labels are displayed INSIDE the slices
COPYING AND PASTING INTO OTHER PROGRAMS
1.
2.
3.
4.
Open a blank Word document
Select your pie chart by clicking on it. Copy it
Switch to your Word doc
Use CTRL+V to paste the pie chart
a. Default paste is to paste linked data and use destination theme (EXPLAIN)
b. Use paste options to change how the object was pasted
c. Different types:
i. Embed (use detination theme)
ii. Embed (keep source formatting)
iii. Link (use destination theme)
iv. Link (use source formatting)
© 2012 Michael J. Walk
11 of 14
Excel 2007 Part 2
5.
6.
7.
8.
9.
v. As picture
Copy your bar chart and paste using link and destination theme
Change your Word document’s theme – WHAT HAPPENS?
Edit the original data by reducing one of the column values to 100
a. Right click on graph in word and choose update link
b. WHAT HAPPENS???
Copy your line graph and paste into Word as picture
a. Does changing the source data affect your graph? Does changing the theme affect? NO!!
This is also true of ppt
INSERTING HYPERLINKS
LINK TO A WEB PAGE:
1.
In cell A1, type Total. Press Enter.
2.
Under the Insert tab, in the Links group, select Hyperlink. You can also Right-click on the cell and
select Hyperlink.
3.
Under Link to, select Existing File or Webpage.
4.
In the Address box, type www.google.com.
5.
Click the Screen Tip button.
6.
Type Google. Click OK.
7.
Click OK.
8.
Click your Hyperlink in cell A1.
LINK TO AN EXISTING FILE:
1.
In cell A3, type Instructions. Press Enter.
2.
Under the Insert tab, in the Links group, select Hyperlink. You can also Right-click on the cell and
select Hyperlink.
3.
Under Link to, select Existing File or Webpage.
4.
Select any file, preferably a Word or Text document.
5.
Click OK.
6.
Click your Hyperlink in cell A3.
LINK TO AN E-MAIL ADDRESS:
© 2012 Michael J. Walk
12 of 14
Excel 2007 Part 2
1.
In cell A5, type E-mail.
2.
Under the Insert tab, in the Links group, select Hyperlink. You can also Right-click on the cell and
select Hyperlink.
3.
Under Link to, select E-mail Address.
4.
In the E-mail Address box, type yourname@ubalt.edu.
5.
Leave a Screen Tip if you wish.
6.
In the Subject box, type Inquiry Concerning Daily Report.
7.
Click OK.
8.
Click your Hyperlink in cell A5.
LINK TO A PLACE IN THIS DOCUMENT:
1.
Select cell A7.
2.
Under the Insert tab, in the Links group, select Hyperlink. You can also Right-click on the cell and
select Hyperlink.
3.
Under Link to, select Place in This Document.
4.
Type the cell reference J15.
5.
Select Sheet2.
6.
Click your Hyperlink in cell A7. You will be taken to Sheet2, J15.
7.
You can also link to a Defined Name (Range).
CREATING A SIMPLE MACRO
To automate a repetitive task, you can quickly record a Macro in Excel. You can also
create a Macro by using the Visual Basic Editor in Microsoft Visual Basic to write your
own Macro script, or to copy all or part of a Macro to a new macro. After you create a
Macro, you can assign it to an object (such as a toolbar button, graphic, or control) so
that you can run it by clicking the object. If you no longer use a Macro, you can delete it.
Set up the Macro:
© 2012 Michael J. Walk
13 of 14
Excel 2007 Part 2
1. Open a new blank worksheet.
2. Click the Microsoft Office Button
, and then click Excel Options.
3. In the Popular category, under Top options for working with Excel, select the Show
Developer tab in the Ribbon check box, and then click OK.
4. On the Developer tab, in the Code group, click Macro Security.
5. Under Macro Settings, click Enable all and then click OK.
6. On the Developer tab, in the Code group, click Record Macro.
7. In the Macro name box, enter a name for the macro.
8. In the Store macro in list, select the workbook where you want to store the macro.
9. Click the Toolbars button under Assign Macro to.
10. If you want a macro to be available whenever you use Excel, select Personal Macro
Workbook.
11. Click OK.
Write the Macro:
1. Select cells C1:H3.
© 2012 Michael J. Walk
14 of 14
Excel 2007 Part 2
2. Type Daily Report.
3. Click the Merge and Center button under the Alignment group.
4. Change the header Daily Report to 14pt., Red, Bold text.
5. Press Enter.
6. Right-Click on Merged Cell, select Format Cells, and select the Alignment tab.
7. Choose Center from the Vertical field.
8. From the Font group, click the Borders button and choose Thick Bottom Border.
9. In cell C5, type Region 1 and use your Fill Series Handle to drag this cell to H5.
10. In cell C11, type =sum(
and highlight C6:C10. Press Enter.
11. Select cell C11 and use your Fill Series Handle to drag this cell to H11.
12. Select cells C11:H11, and place a Top Border on the range.
13. Click the Stop Recording button.
Invoke the Macro:
1. Select the Sheet2 tab.
2. Click your Macro button.
© 2012 Michael J. Walk
Download