0% found this document useful (0 votes)
21 views9 pages

ExcelData2 FilterPivot

This document provides an overview of using advanced filters and basic pivot tables in Excel. It discusses using comparison operators and wildcard criteria with advanced filters. It also covers using the SUBTOTAL worksheet function to perform calculations on filtered lists, including the different function numbers. The document then provides step-by-step exercises for applying advanced filters with multiple criteria, copying filtered data to another location, and using the SUBTOTAL function to calculate subtotals and grand totals.

Uploaded by

JMFM
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views9 pages

ExcelData2 FilterPivot

This document provides an overview of using advanced filters and basic pivot tables in Excel. It discusses using comparison operators and wildcard criteria with advanced filters. It also covers using the SUBTOTAL worksheet function to perform calculations on filtered lists, including the different function numbers. The document then provides step-by-step exercises for applying advanced filters with multiple criteria, copying filtered data to another location, and using the SUBTOTAL function to calculate subtotals and grand totals.

Uploaded by

JMFM
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Excel Data 2: Advanced Filter

and Basic PivotTables

[email protected]
Excel Data 2: Advanced Filter and Basic PivotTables
1.5 hour Classroom* / 1.0 hour Zoom Session
* Classroom sessions include time to repeat exercises for practice

Filter by using advanced criteria ..................................................................................................... 3


Comparison operators ................................................................................................................ 3
Wildcard criteria.......................................................................................................................... 3

SUBTOTAL Worksheet Function ...................................................................................................... 4


Class Exercise Filters ........................................................................................................................ 5
Review Basic Filters ..................................................................................................................... 5
Advanced Filter ........................................................................................................................... 5
Multiple criteria - AND ................................................................................................................ 6
Multiple criteria – OR .................................................................................................................. 6
Another Location ........................................................................................................................ 6
Copy Specific Titles...................................................................................................................... 6

Class Exercise SubTotal function ..................................................................................................... 7


Set up Grand Total ...................................................................................................................... 7
Set up SubTotal ........................................................................................................................... 7
SubTotal Worksheet Function Exercise ...................................................................................... 7
SubTotal Worksheet with Advanced Filter ................................................................................. 8
PIvotTable Exercise ..................................................................................................................... 9

Pandora Rose Cowart


Education/Training Specialist
UF Health IT Training

E-204, Professional Park (352) 273-5051


PO Box 100002 [email protected]
Gainesville, FL 32610-0002 http://training.health.ufl.edu

Class Evaluation: https://ufl.qualtrics.com/jfe/form/SV_1Ojjkl6lRsKV3XT

Updated 06/27/2022
Filter by using advanced criteria This page is from
the Excel Help file
If the data you want to filter requires complex criteria (such as Type = "Produce" OR
Salesperson = "Davolio"), you can use the Advanced Filter dialog box.

To open the Advanced Filter dialog box, click Data > Advanced.

The Advanced command works differently from the Filter command in several important ways.
• It displays the Advanced Filter dialog box instead of the AutoFilter menu.
• You type the advanced criteria in a separate criteria range on the worksheet and above the range of
cells or table that you want to filter. Microsoft Office Excel uses the separate criteria range in the
Advanced Filter dialog box as the source for the advanced criteria.

Comparison operators

You can compare two values by using the following operators. When two values are compared by using
these operators, the result is a logical value—either TRUE or FALSE.

Comparison operator Meaning Example


= (equal sign) Equal to A1=B1
> (greater than sign) Greater than A1>B1
< (less than sign) Less than A1<B1
>= (greater than or equal to sign) Greater than or equal to A1>=B1
<= (less than or equal to sign) Less than or equal to A1<=B1
<> (not equal to sign) Not equal to A1<>B1

Wildcard criteria

To find text values that share some characters but not others, do one or more of the following:
• Type one or more characters without an equal sign (=) to find rows with a text value in a column
that begin with those characters. For example, if you type the text Dav as a criterion, Excel finds
"Davolio," "David," and "Davis."

• Use a wildcard character.

Use To find
Any single character
? (question mark)
For example, sm?th finds "smith" and "smyth"
Any number of characters
* (asterisk)
For example, *east finds "Northeast" and "Southeast"
A question mark, asterisk, or tilde
~ (tilde) followed by ?, *, or ~
For example, fy91~? finds "fy91?"

3
SUBTOTAL Worksheet Function
We can do common mathematical functions with our filtered lists using the SUBTOTAL worksheet
function. The syntax is for this function is "SUBTOTAL(function_num,ref1,ref2,...)". Function_num is the
number 1 to 11 that specifies which 'function' to use in calculating subtotals within a list (see below).
The ref1, ref2… are the ranges of data that should be used in the equation, there can be up to 29
different ranges used in this function.

Function_Num Function Function_Num Function


1 ........................ AVERAGE 7 ........................ STDEV
2 ........................ COUNT 8 ........................ STDEVP
3 ........................ COUNTA 9 ........................ SUM
4 ........................ MAX 10 ....................... VAR
5 ........................ MIN 11 ....................... VARP
6 ........................ PRODUCT

Function numbers 1 through 11 will include manually hidden rows, ones you have hidden yourself.
Function numbers 101-111 will exclude your hidden rows from the function. Filtered-out rows are
always excluded.

4
Class Exercise Filters

- Open the file SortCustomers.xlsx

Review Basic Filters


- Right-Click on a city of Waldo
- Choose Filter -> Filter by Selected Cell's Value

- Turn Filter off from the Sort & Filter menu, or the Data tab (keyboard shortcut Shift-Ctrl-L )

Advanced Filter
- In cell J1 type City
- In cell J2 type Waldo
- Return to dataset (ctrl-Home)
- From the Data tab, choose Advanced Filter

- The list range should be filled in for $A$1:$H$77


- Click in the Criteria Range and choose cells J1 and J2
- Click OK  9 records

***Notice there are no filter arrows, number of records is listed


in the status bar, and row numbers turned blue.

- Click the Clear button from the Sort & Filter group

5
Multiple criteria - AND
- In cell J1 type DUE DATE
- in cell J2 type >=7/1/2019
- In cell K1 type DUE DATE
- in cell K2 type <=6/30/20
- click on the Advanced filter option
- set the Criteria Range to $J$1:$K$2
- Click OK  23 Records
- Click the Clear button from the Sort & Filter group

Multiple criteria – OR
- In cell L1 type Balance
- Skip L2
- in cell L3 type >600
- click on the Advanced filter option
- set the Criteria Range to $J$1:$L$3
- Click OK  26 Records
- Click the Clear button from the Sort & Filter group

Another Location
- change K2 to <=7/31/2019
- click on the Advanced filter option
- set the Copy to $J$6
- click OK
- there' s no UNDO
- click in the new dataset, press Ctrl A
- right-click and Delete

Copy Specific Titles


- in cell J6 type FIRST
- in cell K6 type LAST
- In cell L6 type CITY
- click on the Advanced filter option
- set the Copy to Sheet1!$J$6:$L$6

Delete Columns J through L


6
Class Exercise SubTotal function

Set up Grand Total


- Turn on the Filter
- Go to Cell H79, Type SubTotal
- Go to Cell H80, Type Total
- Go to Cell G80, press the AutoSum button ∑ (on the Home or Formulas tab)
- Modify equation to stop at row 78
**** =SUM(G2:G78)
- Result: $23,192.00

Set up SubTotal
- Return to the top of the worksheet (Ctrl-Home)
- Set City filter to show only Waldo
- Go to Cell G79, press the AutoSum button ∑
**** See Page 5 for details on the SubTotal Worksheet Function
- Result: $2,325.00

Viewing the different Subtotals


- From the City drop down, set it so you can only see Starke
- Result: $1,290.00
- From the City drop down, set it so you can only see Jacksonville
- Result: $3,506.00
- From the City drop down, set it so you can only see Gainesville
- Result: $16,071.00
Exit Excel

SubTotal Worksheet Function Exercise

- Open file ExcelData2-Sales.xlsx

- Insert four rows at the top of the worksheet


- Select the first four rows
- Right-Click inside the select and choose INSERT

- Create this table:

7
- Click inside the dataset, turn on the Filter

- Use the filter tools to find these 3 records:


- Quarter: 2nd Quarter
- Item: Pants
- Color: Red

- Build the following equations

You have to go above and below the showing numbers so that you include all the hidden cells!
If you only use E43:E49 you will lose all the data currently hidden.
- View Page 4 for the "answers"
- Clear the filter, the numbers in Column E should match the numbers in Column B

SubTotal Worksheet with Advanced Filter

- Clear cells A1 through B3


- In cell A1 type: Item
- In cell A2 type: Pants
- In cell B1 type: Size
- In cell B2 type: Small
- Click inside the large dataset
- From the Data tab,
choose Advanced Filter
- if needed, Set the List
range to $A$5:$E$167
- Set the Criteria Range to
$A$1:$B$2
- Click OK  18 records
Exit Excel
8
PIvotTable Exercise
- Open file ExcelData2-Sales.xlsx
- Plan Pivot Table

- From the Insert tab choose PivotTable


- Click OK to make a new sheet
- Drag Item into the Rows section
- Drag Color into the Columns section
- Drag # Sold to the Values section
- Drag Size to the Rows section
- Swap Item and Size
- Drag Quarter to the Filters section
- Filter Quarter for 1st Quarter

Source:https://media.news.health.ufl.edu/misc/training/Handouts/zoom/Excel/ExcelData2-FilterPivot.pdf
9

You might also like