Beruflich Dokumente
Kultur Dokumente
Excel 2003
TABLE OF CONTENTS
Module 4
Objectives:
When you have completed these lessons, you will be able to:
Create a PivotTable Create a PivotTable from an Access database Update information in a PivotTable Add information to a PivotTable Arrange information in a PivotTable Remove information from a PivotTable Create a page in a PivotTable Display pages on separate sheets Use other Functions in calculated fields Insert calculated fields Hide calculated fields Delete calculated fields Create a chart from a PivotTable Create a one-variable What-If table Create a two-variable What-If table Create and apply scenarios Edit and delete scenarios Use the goal seek tool Use the solver tool
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
Creating A PivotTable
Module 4
Databases or data lists consist of many fields and records. These records are considered raw data. To convert the data into useful information, you need to organize the list and summarize specific details while excluding the irrelevant ones. At times, you may have several similar Microsoft Excel lists, which need to be consolidated to produce a single report. In this case, PivotTable report can be used to accomplish the task.
This is a raw data in a database that need to be summarized in order to produce an informative report.
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Create A PivotTable
Module 4
Before you begin, create a new worksheet and enter the database list, as shown below. You can also copy the database list that you have created in the previous lesson and paste it on the cell A1 in this new worksheet.
SUMMARY
1. Click any cell in the database. 2. Click Data >> PivotTable and PivotChart Report. 3. Click the Next button. 4. Select the database range you want to analyze. 5. Click the Next button. 6. Click the Layout button. 7. Drag fields into the Column, Row, Data and Page areas. 8. Click the OK button. 9. Click the Finish button.
1.
Click any cell in the database. From the menu, click Data >> PivotTable and PivotChart Report.
The PivotTable and PivotChart Wizard Step 1 of 3 dialog box appears. Excel automatically assumes that you want to analyze a Microsoft Office Excel list and create a PivotTable from the list.
2.
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
3.
Click the Next button.
Module 4
The Step 3 of 3 dialog box appears. By default, the PivotTable is going to be created in a new worksheet. If you want the PivotTable report to be placed on the same worksheet, select the existing worksheet option button and then specify the cell where you want to place the PivotTable.
4.
Description Displays data in the field as column labels. Displays data in the field as row labels. Displays calculated values from the selected field. Filters records you want to show in the PivotTable.
10
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
5.
Module 4
Drag the Month button into the Column area, the Sales Person button into the Row area and the Sales Value button into the Data area.
The Sales Value button changes to Sum of Sales Value when you drag it into the Data area.
6.
11
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Create A PivotTable From An Access Database
Module 4
Before you begin, make sure you have an Access database ready in your computer. Here, we will use the sample database: Northwind.mdb, which comes with the Microsoft Access application.
1.
SUMMARY
From the menu, click Data >> PivotTable and PivotChart Report.
The PivotTable and PivotChart Wizard Step 1 of 3 dialog box appears.
1. Click Data >> PivotTable and PivotChart Report. 2. Click the External data source option. 3. Click the Next button. 4. Click the Get Data button. 5. Click MS Access database. Then click the OK button. 6. Select the database file you want. 7. Click the OK button. Then select the table you want and click to define your query. 8. Click the Next button until you see the Finish button and click the Finish button. 9. Click the Next button and then click the Finish button.
2.
12
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
3.
Click the Get Data button.
The Choose Data Source dialog box appears.
Module 4
4.
Click MS Access Database from the list. Then click the OK button. Select the Northwind.mdb database from your computer.
Northwind.mdb is stored in C:|Program Files\Microsoft Office|Office11|Samples folder by default.
5.
Click the OK button. Select the tables and columns you want. Then click to define the columns in your query.
The Query Wizard dialog box is shown as below.
13
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
6.
Module 4
Keep clicking the Next button until you see the Finish button. Click the Finish button.
Excel returns to the PivotTable wizard step 2 of 3. The message `Data fields have been retrieved. appears next to the Get Data button.
7.
8.
14
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
Updating A PivotTable
Module 4
A PivotTable will not be updated automatically when you edit the source database. You have to manually update the PivotTable.
1.
SUMMARY
2.
TIPS
You can also rightclick the PivotTable, then click Refresh Data from the shortcut menu.
3.
Click the
The total for John Cage in Mar is updated from 5200 to 5400.
15
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Add An Information Field To A PivotTable
Module 4
1. 2.
Drag and drop the Product field button from the PivotTable Field List to the Column area in the PivotTable.
Drop the field below the month details. Make sure a thick shaded line appears below the cell B4:D4, which is where you want to add the information.
SUMMARY
1. Click the PivotTable. 2. Drag and drop the field button from the PivotTable Field List to the PivotTable area where you want to add the information.
3.
16
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Arrange Information In A PivotTable
Module 4
1.
Drag and drop the Month field button from the PivotTable Column area onto the Row area in the PivotTable.
Drop the field button below the month details. Make sure a thick shaded line appears at the right of cell A5:A10, which is where you want to place the information.
SUMMARY
1. Click the PivotTable. 2. Drag and drop the field button from the column area to the row area or vice versa.
2.
17
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Remove Information From A PivotTable
Module 4
1.
Drag and drop the Month field button in PivotTable away from the PivotTable.
You can see that the pointer changes to a Remove Field pointer.
SUMMARY
1. Click the PivotTable. 2. Drag the field button for the field you want to delete away from the PivotTable.
2.
18
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Create A Page In A PivotTable
Module 4
1.
Drag and drop the Month field from the PivotTable Field List onto the Page area in the PivotTable.
The page area will hold the month field button for you to filter records by month. It shows all the records by default.
SUMMARY
1. Click the PivotTable. 2. Drag and drop the field button from the PivotTable Field List to the Page area in the PivotTable.
2.
3.
4.
19
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Display Pages On Separate Sheets
Module 4
1.
Click the PivotTable. On the PivotTable toolbar, click PivotTable >> Show Pages.
The Show Pages dialog box appears.
SUMMARY
1. Click the PivotTable. 2. On the PivotTable toolbar, click PivotTable >> Show Pages. 3. In the Show all pages of box, select the field you want. 4. Click the OK button.
TIPS
If you want to remove the sheets, you have to delete each sheet manually. Right-click the sheet tab and click Delete from the shortcut menu. Then, click the Delete button to confirm the deletion.
2.
In the Show all pages of box, click Month. Then, click the OK button.
All the records are copied onto separate sheets in the workbook. The sheets are named after the page field information. The Feb sheet contains Feb records and the Mar sheet contains Mar records.
20
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
Modifying A Calculated Field In A PivotTable
Module 4
Besides using the Sum function to find the total for the number fields, you are able to use other functions such as Average, Maximum, and Minimum.
1.
SUMMARY
1. Double-click the calculated field in the PivotTable. 2. In the Summarize by box, click the function you want. 3. Click the OK button.
2.
3.
21
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Insert A Calculated Field
Module 4
1.
Click any cell in the PivotTable. From the PivotTable toolbar, click PivotTable >> Formulas >> Calculated Field.
If you do not see the Formulas command, click command list. at the bottom of the
SUMMARY
1. Click the PivotTable. 2. On the PivotTable toolbar, click PivotTable >> Formula >> Calculated Field. 3. In the Name box, type the calculated field name you want. 4. In the Formula box, type the formula for the calculated field. 5. Click the Add button. 6. Click the OK button.
2.
In the Name box, type Commission. In the Formula box, type =Sales Value*20%.
The Insert Calculated Field dialog box appears as shown below.
22
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
3.
Click the Add button.
Module 4
The new calculated field (Commission) is added into the Fields list box, as shown below.
4.
23
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Hide A Calculated Field
Module 4
1.
SUMMARY
1. Click the Data dropdown arrow in the PivotTable. 2. Uncheck the calculated field you want to hide. 3. Click the OK button.
2.
3.
24
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Delete Calculated Fields
Module 4
1.
Click any cell in the PivotTable. From the PivotTable toolbar, click PivotTable >> Formulas >> Calculated Field.
The Insert Calculated Field dialog box appears.
2.
SUMMARY
1. Click the PivotTable. 2. From the PivotTable toolbar, click PivotTable >> Formula >> Calculated Field. 3. Click the Name dropdown arrow. 4. Select the field you want to delete. 5. Click the Delete button. 6. Click the OK button.
3.
25
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
Creating A Chart From A PivotTable
Module 4
You can create a Pivot Chart from the menu or create the chart directly from an existing PivotTable.
1.
Click any cell in the PivotTable. Click the button on the PivotTable toolbar.
The chart is created and placed on a new sheet.
Chart
SUMMARY
1. Click the PivotTable. 2. Click on the PivotTable toolbar. 3. Click the title button and check or uncheck the items to show or hide the information you want. 4. Click the OK button.
2.
TIPS
If you want to create the chart from the database list instead of the PivotTable, click the database list and from the menu, click Data >> PivotTable and PivotChart Report. Click the PivotChart option button in the dialog box.
Click the Sales Person title button on the x-axis. Then click to specify which sales persons you want to show in the chart.
Uncheck the boxes to hide the sales persons. You can also hide the information for the Legend and the Page.
3.
26
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
Exploring What-If Table
Module 4
You can analyze data with a series of What-If questions and produce a table to show the results.
Example: You want to find the revenue and the Grand Total if the variables change in the table.
Your management wants you to produce a What-If analysis report from the source above. When a single variable like unit price is increased to $630, $640, $650 and $660, the one-input What-If table is used.
When the unit price is changed to $620, $630, $640 and $650 while the projected number of units sold is changed to 170000, 180000, 190000 and 200000, the two-input What-If table is used.
27
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Create A One-Variable What-If Table
Module 4
1.
In the cell B12, enter the formula =D5 in the What-If table column heading.
Enter both the tables to do this exercise. B12 is the column heading for the Projected Revenue in the What-If table.
SUMMARY
1. Create the tables. 2. Enter the formulas in What-If table column headings. 3. Select the entire What-If table. 4. Click Data >> Table. 5. In the Row input cell or Column input cell box, enter the cell reference. 6. Click the OK button.
2.
In the cell C12, enter the formula =D7 in the table column heading. Press <Enter>.
C12 is the column heading for the Grand Total in the What-If table.
3.
28
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
4.
From the menu, click Data >> Table.
The Table dialog box appears.
Module 4
5.
In the Column input cell box, enter the cell reference $B$5.
Use the mouse to click the column input cell and click the cell B5. If you type the cell reference manually, use absolute reference with a $ sign.
6.
29
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Create A Two-Variable What-If Table
Module 4
1.
In the first cell of the What-If table, at the cell B12, enter the formula =D7. Press <Enter>.
A12 is the formula to calculate the Grand Total for the What-If table.
SUMMARY
1. Create the table. 2. Enter the formula in the first cell of the What-If table. 3. Select the entire What-If table. 4. Click Data >> Table. 5. In the Row input cell or Column input cell box, enter the cell reference. 6. Click the OK button.
2.
3.
30
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
4.
Module 4
In the Row input cell box, enter the cell reference $B$5. In the Column input cell box, enter the cell reference $C$5.
Use the mouse to click the row input cell and click the cell B5, then click the column input cell and click the cell C5. If you type the cell reference manually, use an absolute reference with a $ sign.
5.
31
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
Using Scenarios
Module 4
Data tables analyze data with 1 or 2 variables while the Scenario Manager enables you to create more than 2 input variables and save the values with a scenario name. Multiple scenarios allow you to perform a series of comparisons within a worksheet without having to update individual cell value.
Example: You want to find the Grand Total of the Revenue for this table.
There are 2 different possible scenarios/projections for all the 4 variables (unit price for each product). If you apply a specific scenario to the table, it is updated instantly to display the new values.
Scenario A
Scenario B
32
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Create Scenarios
Module 4
1.
SUMMARY
1. Click Tools >> Scenarios. 2. Click the Add button. 3. In the Scenario name: box, enter the scenario name. 4. In the Changing cells: box, enter the range of cells that will change. 5. Click the OK button. 6. Type in the value for each changing cell. 7. Click the OK button. 8. Click the Add button. 9. Enter the second scenario.
2. 3.
In the Scenario name: box, type Scenario A. In the Changing cells: box, type $B$3:$B$6.
Comments are optional. You can click the Changing cells box and select the range B3:B6 instead of typing the cell reference.
33
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
4. 5.
Click the OK button.
The Scenario Values dialog box appears.
Module 4
In the $B$3 box, type 520. In the $B$4 box, type 340. In the $B$5 box, type 630. In the $B$6 box, type 270.
This is to enter the values for all the changing cells in Scenario A.
6. 7.
34
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
8.
TIPS
Module 4
In the $B$3 box, type 510. In the $B$4 box, type 350. In the $B$5 box, type 620. In the $B$6 box, type 280.
This is to enter the values for all the changing cells in Scenario B.
Use the Merge button to copy a scenario from another workbook. The workbook contains the scenario must be opened for you to merge.
9.
35
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Apply A Scenario
Module 4
1. 2.
SUMMARY
1. Click Tools >> Scenarios. 2. In the Scenarios box, select the scenario you want to apply. 3. Click the Show button.
3.
36
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Edit A Scenario
Module 4
1. 2.
SUMMARY
1. Click Tools >> Scenarios. 2. Select the scenario you want to edit. 3. Click the Edit button. 4. Select the new range of changing cells. 5. Click the OK button. 6. Change the values of the changing cells. 7. Click the OK button. 8. Click the Close button.
3.
37
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
4.
Click the OK button.
The Scenario Values dialog box appears.
Module 4
5.
Change the values for this scenario. Click the OK button when you are finished.
The Scenario Manager dialog box appears again.
6.
38
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Delete A Scenario
Module 4
1. 2.
SUMMARY
1. Click Tools >> Scenarios. 2. Select the scenario you want to delete. 3. Click the Delete button. 4. Click the Close button.
3.
4.
39
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
Implementing Problem Solving
Module 4
Goal Seek is a tool for you to find solutions to a problem. It helps you to find the best solution by analyzing single variable. Problem: You need to get a Total Income of $6,000.00. So you should increase the Sales. How much sales do you need to achieve? Solution: To calculate the new sales value, use goal seek to set cell B5 to value 6000 by changing cell B1. You will get the solution that your sales need to be increased to $40,000.00 in order to reach your goal of getting a total income of $6,000.00. Create the following table on a new worksheet.
40
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
Module 4
Solver is a tool for you to find solutions to a problem. It helps you to find the best solution by analyzing multiple variables. Problem: You need to find the maximum net income you can put into your savings for the month. You need to increase the sales and decrease your monthly expenses. However, there are certain limitations and constraints. For example, the constraints here might be 1) There is always a limit or maximum sales you can achieve within the month. 2) There is a minimum monthly expense you must spend within the month. Solution: To calculate the maximum Balance for Saving, use the Solver tool to set cell B7 to maximum. Define the following constraints: 1) Cell B1 (Sales) <= 50,000. 2) Cell B6 (Expenses) >= 3,500 You will get the solution that your maximum Balance for Saving is $3,000. Before you begin, create the following table on a new worksheet.
41
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Use The Goal Seek Tool
Module 4
1.
SUMMARY
1. Click the cell you want to set the goal for. 2. Click Data >> Table. 3. In the To value box, enter the value. 4. In the By changing cell box, enter the cell. 5. Click the OK button. 6. Click the next OK button.
2.
3.
In the To value box, type 6000. In the By changing cell box, type $B$1.
You can click the By changing cell box and select B1 instead of typing in the cell reference $B$1.
42
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
4.
Click the OK button.
Module 4
The Goal Seek Status dialog box displays the solution. Click the OK button to accept the solution Cancel to reject it.
5.
43
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Load Add-Ins
Module 4
1. 2.
SUMMARY
1. Click Tools >> AddIns. 2. Check the Add-Ins check boxes for the tools you want. 3. Click the OK button.
3.
44
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
How To Use The Solver Tool
Module 4
1.
SUMMARY
1. Click the cell you want to solve. 2. Click Tools >> Solver. 3. For Equal To, select the option you want. 4. In the By Changing Cells box, select the cells that you want to change. 5. Under Subject to The constraints, click the Add button. 6. Specify the constraints. 7. Click the OK button. 8. Click the Solve button.
2. 3. 4.
5.
Under Subject to the Constraints, click the Add button. Specify the constraint cell B1 <= 50000.
This will set the maximum sales to 50000 as the first constraint.
45
Microsoft
Excel 2003
CREATING PIVOT TABLE AND ANALYZING DATA
6.
Module 4
Click the Add button. Specify the constraint cell B6 >= 3500.
You want to set the minimum expenses 3500 as the second constraint.
7.
8.
46