ExcelData2 FilterPivot
ExcelData2 FilterPivot
[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
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.
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 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 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
- 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
- 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
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
7
- Click inside the dataset, turn on the Filter
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
Source:https://media.news.health.ufl.edu/misc/training/Handouts/zoom/Excel/ExcelData2-FilterPivot.pdf
9