Sei sulla pagina 1di 2

Montclair State University

Advanced Excel

Filtering Pivot Table Report

Filtering is a quick and easy way to find and work with a A PivotTable report is an interactive table that you can use to
subset of data in a list. A filtered list displays only the rows quickly summarize large amounts of data. You can rotate its
that meet the criteria you specify for a column. Microsoft rows and columns to see different summaries of the source
Excel provides two commands for filtering lists: data, filter the data by displaying different pages, or display
• AutoFilter, which includes filter by selection, for the details for areas of interest.
simple criteria Creating a PivotTable report
• Advanced Filter, for more complex criteria 1. Open the workbook where you want to create the Pivot-
Unlike sorting, filtering does not rearrange a list. Filtering Table report.
temporarily hides rows you do not want displayed. 2. If you are basing the report on a Microsoft Excel list or
When Excel filters rows, you can edit, format, chart, and database, click a cell in the list or database.
print your list subset without rearranging or moving it. 3. On the Data menu, click PivotTable and PivotChart
Auto Filter Report.
When you use the AutoFilter command, AutoFilter arrows 4. In step 1 of the PivotTable and PivotChart Wizard,
appear to the right of the column labels in the filtered lis t. follow the instructions, and click PivotTable under
How to filter a list. What kind of report do you want to create?
Using the AutoFilter arrows Clicking an AutoFilter arrow 5. Follow the instructions in step 2 of the wizard.
displays a list of all unique, visible items in the column, in- 6. In step 3 of the wizard, determine whether you need
cluding blanks (all spaces) and nonblanks. By selecting an to click Layout.
item from a list for a specific column, you can instantly hide 7. Do one of the following:
all rows that don't contain the selected value. If you clicked Layout in step 3, after you lay out
Quickly filtering values If you are filtering a list of num- the report in the wizard, click OK in the PivotTable
bers, you can quickly view the largest values in the list by and PivotChart Wizard – Layout dialog box,
clicking the Top 10 item in the AutoFilter list. To resume and then click Finish to create the report.
viewing everything in the column, click All.

How to Filter a List Using Worksheets

Use worksheets to list and analyze data. You can enter and
Display a subset of rows in a list by using filters
edit data on several worksheets simultaneously and perform
1. Click a cell in the list you want to filter. calculations based on data from multiple worksheets. When
2. On the Data menu, point to Filter, and then click Auto- you create a chart, you can place the chart on the worksheet
Filter. with its related data or on a separate chart sheet.
3. To display only the rows that contain a specific value, Sheet tabs The names of the sheets appear on tabs at the bot-
click the arrow in the column that contains the data you tom of the workbook window. To move from sheet to sheet,
want to display. click the sheet tabs.
4. Click the value. Inserting a new worksheet
5. To apply an additional condition based on a value in • To add a single worksheet, click Worksheet on the In-
another column, repeat steps 3 and 4 in the other col- sert menu.
umn. To filter the list by two values in the same col- • To add multiple worksheets, hold down SHIFT, and
umn, or to apply comparison operators other than then click the number of worksheet tabs you want to add
Equals, click the arrow in the column, and then click in the open workbook. Then click Worksheet on the
Custom. For information about displaying rows by Insert menu.
comparing values, click .
Montclair State University
Advanced Excel—2

Macros Editing a Macro

Automating tasks you perform frequently Before you edit a macro, you should be familiar with the
If you perform a task repeatedly in Microsoft Excel, you can Visual Basic Editor. The Visual Basic Editor can be used to
automate the task with a macro. A macro is a series of com- write and edit macros attached to Microsoft Excel work-
mands and functions that are stored in a Visual Basic module books.
and can be run whenever you need to perform the task. When 1. On the Tools menu, point to Macro, and then click
you record a macro, Excel stores information about each step Macros.
you take as you perform a series of commands. You then run 2. In the Macro name box, enter the name of the macro.
the macro to repeat, or "play back," the commands. 3. Click Edit.

Recording a Macro Running a Macro

1. On the Tools menu, point to Macro, and then click Re- 1. Open the workbook that contains the macro.
cord New Macro. 2. On the Tools menu, point to Macro, and then click
2. In the Macro name box, enter a name for the macro. Macros.
The first character of the macro name must be a letter. 3. Show Me
Other characters can be letters, numbers, or underscore 4. In the Macro name box, enter the name of the macro
characters. Spaces are not allowed in a macro name; an you want to run.
underscore character works well as a word separator. 5. Click Run.
3. To run the macro by pressing a keyboard shortcut key,
enter a letter in the Shortcut key box. You can use
CTRL+ letter (for lowercase letters) or CTRL+SHIFT+
letter (for uppercase letters), where letter is any letter Absolute Referencing
key on the keyboard. The shortcut key letter you use
cannot be a number or special character such as @ or #.
The shortcut key will override any default Microsoft A reference identifies a cell or a range of cells on a
Excel shortcut keys while the workbook that contains worksheet and tells Microsoft Excel where to look for the
the macro is open. values or data you want to use in a formula. With references,
4. In the Store macro in box, click the location where you you can use data contained in different parts of a worksheet
want to store the macro. in one formula or use the value from one cell in several for-
If you want a macro to be available whenever you mulas. You can also refer to cells on other sheets in the same
use Excel, store the macro in the Personal Macro workbook, to other workbooks, and to data in other pro-
Workbook in the Excel Startup folder. To include a grams. References to cells in other workbooks are called ex-
description of the macro, type the description in the ternal references. References to data in other programs are
Description box. called remote references.
5. Click OK. Absolute references If you don't want Excel to ad-
If you select cells while running a macro, the macro just references when you copy a formula to a different cell,
will select the same cells regardless of which cell is use an absolute reference. For example, if your formula mu l-
first selected because it records absolute cell refe r- tiplies cell A5 with cell C1 (=A5*C1) and you copy the for-
ences. If you want a macro to select cells regardless mula to another cell, Excel will adjust both references. You
of the position of the active cell when you run the can create an absolute reference to cell C1 by placing a dollar
macro, set the macro recorder to record relative cell sign ($) before the parts of the reference that do not change.
references. On the Stop Recording toolbar, click To create an absolute reference to cell C1, for example, add
Relative Reference . Excel will continue to record dollar signs to the formula as follows:
macros with relative references until you quit Excel =A5*$C$1
or until you click Relative Reference again.
6. Carry out the actions you want to record.
7. On the Stop Recording toolbar, click Stop Recording .

Potrebbero piacerti anche