43
Live Excel Formula Feeds You Can Subscribe to Excel 2007 Overview Excel 2007 Conditional Formatting Array Formulas CountIf Formula Counting Formulas Database Formulas Date & Time Formulas Engineering Formulas Financial Formulas Logical Formulas Lookup Formulas New Formulas Statistical Formulas Sumif Formula Sumproduct Formula Text Formulas Excel Advanced Filter Introduction 1. Excel Advanced Filter-- Introduction a) Apply an Excel Advanced Filter b) Filter Unique Records c) Extract Data to Another Worksheet d) Setting up the Criteria Range e) Using Wildcards in Criteria f) Criteria Examples 2. Advanced Filters --

Live Excel Formula Feeds You Can Subscribe To

Embed Size (px)

Citation preview

Page 1: Live Excel Formula Feeds You Can Subscribe To

Live Excel Formula Feeds You Can Subscribe to

Excel 2007 Overview Excel 2007 Conditional Formatting Array Formulas CountIf Formula Counting Formulas Database Formulas Date & Time Formulas Engineering Formulas Financial Formulas Logical Formulas Lookup Formulas New Formulas Statistical Formulas Sumif Formula Sumproduct Formula Text Formulas

Excel Advanced Filter Introduction1. Excel Advanced Filter--Introduction     a) Apply an Excel Advanced Filter    b) Filter Unique Records    c) Extract Data to Another Worksheet    d) Setting up the Criteria Range     e) Using Wildcards in Criteria     f) Criteria Examples2. Advanced Filters -- Complex Criteria

Apply an Excel Advanced Filter

1. Set up the database

1. The first row (A1:D1) has headings.

2. Subsequent rows contain data.

3. There are no blank rows within the

Download zipped Excel advanced filter workbook with sample data and criteria.

Page 2: Live Excel Formula Feeds You Can Subscribe To

database.

4. There is a blank row at the end of the database, and a blank column at the right.

2. Set up the Criteria Range (optional)

In the criteria range for an Excel advanced filter, you can set the rules for the data that should remain visible after the filter is applied. You can use one criterion, or several.

1. In this example, cells F1:F2 are the criteria range.

2. The heading in F1 exactly matches a heading (D1) in the database.

3. Cell F2 contains the criterion. The > (greater than) operator is used, with the number 500 (no $ sign is included)..

After the Excel advanced filter is applied, orders with a total greater than $500 will remain visible.

Other operators include:< less than <= less than or equal to >= greater than or equal to <> not equal to

3. Set up the Extract Range (optional)

If you plan to copy the data to another location, you can specify the columns that you want to extract. If you want to extract ALL columns, you can leave the extract range empty for the Excel advanced filter.

1. Select the cell at the top left of the

Page 3: Live Excel Formula Feeds You Can Subscribe To

range for the extracted data.

2. Type the headings for the columns that you want to extract. These must be an exact match for the column headings, in spelling and punctuation. The column order can be different, and any or all of columns can be included.

4. Apply the Excel Advanced Filter

1. Select a cell in the database.2. From the Data menu, choose

Filter, Advanced Filter. (In Excel 2007, click the Data tab on the Ribbon, then click Advanced Filter.)

3. You can choose to filter the list in place, or copy the results to another location.

4. Excel should automatically detect the list range. If not, you can select the cells on the worksheet.

5. Select the criteria range on the worksheet

6. If you are copying to a new location, select a starting cell for the copyNote: If you copy to another location, all cells below the extract range will be cleared when the Advanced Filter is applied.

7. Click OK

 

Page 4: Live Excel Formula Feeds You Can Subscribe To

Filter Unique RecordsYou can use an Excel Advanced Filter to extract a list of unique items in the database. For example, get a list of customers from an order list, or compile a list of products sold:

Note: The list must contain a heading, or the first item may be duplicated in the results.

1. Select a cell in the database.2. From the Data menu, choose

Filter, Advanced Filter.(In Excel 2007, click the Data tab on the Ribbon, then click Advanced Filter.)

3. Choose 'Copy to another location'.

4. For the List range, select the column(s) from which you want to extract the unique values.

5. Leave the Criteria Range blank.6. Select a starting cell for the

Copy to location.7. Add a check mark to the

Unique records only box.8. Click OK.

Watch the Video

View the steps described above, in a short video clip.   Excel 2007 video

 

Extract Data to Another WorksheetIf the database is on Sheet1, you

Page 5: Live Excel Formula Feeds You Can Subscribe To

can extract data to Sheet2, by using an Excel Advanced Filter:

1. Go to Sheet 22. Select a cell in an unused

part of the sheet (cell C4 in this example).

3. From the Data menu, choose Filter, Advanced Filter.(In Excel 2007, click the Data tab on the Ribbon, then click Advanced Filter.)

4. Choose Copy to another location.

5. Click in the List Range box 6. Select Sheet 1, and select

the database. 7. (optional) Click in the

Criteria range box. 8. Select the criteria range 9. Click in the Copy to box. 10. Select the cell on Sheet 2 in

which you want the results to start, or select the headings that you have typed on Sheet 2.

11. (optional) Check the box for Unique Values Only

12. Click OK

Watch the Video

View the steps described above, in a short Excel video tutorial on Excel advanced filter.

 

Setting up the Excel Advanced Filter Criteria Range

 

1.

Page 6: Live Excel Formula Feeds You Can Subscribe To

AND vs OR

If a record meets all criteria on one row in the criteria area, it will pass through the Excel advanced filter. In example 1, at right --customer must be MegaMart AND product must be Cookies AND total must be greater than 500.

 

Criteria on different rows are joined with an OR operator. In the second example at right --customer must be MegaMart OR product must be Cookies OR total must be greater than 500.

2.

By using multiple rows, you can combine the AND and OR operators. In the third example at right -- customer must be MegaMart AND product must be Cookies ORproduct must be Cookies AND total must be greater than 500.

3.

Using Wildcards in Criteria

Use wildcard characters to filter for a text string in a cell.

 

The * wildcard

Page 7: Live Excel Formula Feeds You Can Subscribe To

The asterisk (*) wildcard character represents any numbe

Page 8: Live Excel Formula Feeds You Can Subscribe To

r of characters in that position, including zero charac

Page 9: Live Excel Formula Feeds You Can Subscribe To

ters.

In this example, any customer whose name contains

Page 10: Live Excel Formula Feeds You Can Subscribe To

"mart" will pass through the Excel advanced filter.

The ? wildcard

The

Page 11: Live Excel Formula Feeds You Can Subscribe To

question mark (?) wildcard character represents one characters in that posi

Page 12: Live Excel Formula Feeds You Can Subscribe To

tion. In this example any 4-letter product that begins with c, and ends with

Page 13: Live Excel Formula Feeds You Can Subscribe To

ke, will pass through the Excel advanced filter.

The ~ wildcard

The tilde (~) wildc

Page 14: Live Excel Formula Feeds You Can Subscribe To

ard character lets you search for characters that are used as wildcards. In this e

Page 15: Live Excel Formula Feeds You Can Subscribe To

xample any products that begins with Good and ends with Eats, will pas

Page 16: Live Excel Formula Feeds You Can Subscribe To

s through the Excel advanced filter.

To find only the product named

Page 17: Live Excel Formula Feeds You Can Subscribe To

Good*Eats, use a tilde character in front of the asterisk.

Excel Advanced Filter Criteria Examples

Extract Items in a Range

To extract a list of items in a range, you can use two columns for one of the fields (e.g. Date). If you enter two criteria on the same row in the

Page 18: Live Excel Formula Feeds You Can Subscribe To

criteria range, you create an AND statement. In this example, any records that are extracted must be greater than the first date AND less than the second date.

Create Two or More Sets of Conditions

If you enter criteria on different rows in the criteria range, you create an OR statement.

In this example, extracted records must meet both conditions in row 2 OR both conditions in row 3.

Extract Items with Specific Text

When you use text as criteria with an Excel advanced filter, Excel finds all items that begin with that text. For example, if you type "Ice" as a criterion, Excel finds "Ice", "Ice Cream" and "Ice Milk"

To extract only the records for Ice, use the following format:      ="=Ice"

Page 19: Live Excel Formula Feeds You Can Subscribe To

Download zipped Excel advanced filter workbook with sample data and criteria.

Excel Filters -- Excel AutoFilter TipsExcel AutoFilter Basics

Tips for working with an Excel AutoFilter, and some workarounds for problems you may encounter.

Limits to Excel AutoFilter Dropdown Lists Count of Filtered Records in Status BarExcel AutoFilter for Text in a Long String

 

 

  

Limits to Excel AutoFilter Dropdown Lists

An Excel AutoFilter dropdown list will only show 1000 entries. As a result, in a large database, the Excel AutoFilter dropdown may not show all the items in the column.

 

 

 

Download a zipped Excel AutoFilter workbook with sample data.

 

Page 20: Live Excel Formula Feeds You Can Subscribe To

You could add a new column, and use a formula to split the list into two groups, e.g.:   =IF(LEFT(C2,1)<"N","A-M","N-Z")

or

to split the list into three groups, nest one IF formula inside another, e.g.:    =IF(LEFT(C2,1)<"I","A-H",IF(LEFT(C2,1)<"Q","I-P","Q-Z"))

Or, for a column with thousands of unique entries, use a formula which extracts the first two or three letters, e.g.:   =LEFT(C2,2)Filter on this column first, then by the intended criteria.

 

 

Count of Filtered Records in Status Bar

Normally, after you have applied an Excel AutoFilter, the Status Bar shows a count of visible records. Sometimes it just says, "Filter Mode." This can happen when your list has many formulas. There are articles in the Microsoft KnowledgeBase that explain:

XL2000: Excel AutoFilter Status Bar Message Shows "Filter Mode" Q213886)XL: AutoFilter Status Bar Message Shows "Filter Mode" (Q189479)

The Status Bar will also show "Filter Mode" if anything is changed in the list,

  

Page 21: Live Excel Formula Feeds You Can Subscribe To

after a filter has been applied. For example, if you format a cell, or type a number in one of the records, the 'Filter Mode' message will appear in the Status Bar.

To see the Filter Mode problem in a video, please watch AutoFilter - Status Bar Shows Filter Mode

 Workaround #1 -- Subtotal

For a record count of the visible rows which contain data, you can use the Subtotal function in a formula in the same row as your headings. For example, to count the visible entries in column D which contain numbers, you could use this formula:       =SUBTOTAL(2,D:D) The 2 in the first argument tells Excel to use the COUNT function on the visible cells in the range.

To count rows that contain text, you could change the formula:       =SUBTOTAL(3,C:C)-1 The 3 is for the COUNTA function, and the -1 removes one for the row which contains the column heading.

NOTE: Blank cells will not be counted -- use a column with no blank cells.

   

Page 22: Live Excel Formula Feeds You Can Subscribe To

Workaround #2 -- Status Bar AutoCalc

(from Excel MVP Dave Peterson)

1. Select a column that you know is non-empty. 2. Right-click on the embossed area of the status bar. 3. Choose Count -- it'll tell you how many are in the selected cells. 4. (If you included the header rows, subtract them.)

To see how many total rows, choose Data>Filter>Show All, select a nice column and look at the bottom of the screen.

The nice thing about this is you can get Min/Max/Average/etc. with just simple mouse clicks and selections.

 

Excel AutoFilter for Text in a Long String

You can use the Custom option to filter for cells that contain specific text. However, if the text is located after the 255th character in the cell, it won't be found. Also, the long text strings don't appear in the dropdown list in the heading cell.

As a workaround, enter the search text string in a cell on the worksheet. Then add a

 

 

 

Page 23: Live Excel Formula Feeds You Can Subscribe To

formula to check for the text.

  1. Insert a new column in the

database, and in the heading cell, type the word you're searching for, e.g.: Shop

2. Enter the following formula in row 2 of the new column:    =ISNUMBER(SEARCH($B$1,A2))

3. Copy the formula down to the last row

4. Filter column B for TRUE 5. To filter for a different word,

type a new string in cell B1, and reapply the filter in column B.

Note: SEARCH is not case sensitive. For a case sensitive filter, use FIND, e.g.:     =ISNUMBER(FIND($B$1,A2))

Download a zipped Excel AutoFilter workbook with sample data.

 

 

 

Excel Filters: Excel 2003 AutoFilter Basics

Page 24: Live Excel Formula Feeds You Can Subscribe To

Use an Excel AutoFilter to hide some of the data in your worksheet. For example, you can focus on sales of a specific product, or print a list of your largest orders.

Note: For Excel 2007 AutoFilter instructions, please go to Excel 2007 AutoFilter Basics

Prepare the DatabaseFilter the DatabaseRemove a FilterCreate a Custom Filter

Download a zipped workbook with Excel 2003 AutoFilter sample data.

  

 

Prepare the Database

1. Set up the database

a) The first row (A1:D1) has headings.

b) Subsequent rows contain data.

c) There are no blank rows within the database -- you can leave some cells blank, but not an entire row.

d) There is a blank row at the end of the database, and a blank column at the right.

 

  

Page 25: Live Excel Formula Feeds You Can Subscribe To

2. Turn on Excel AutoFilter

a) Select a cell in the database.b) From the Data menu, choose Filter, AutoFilter.

A dropdown arrow appears beside each column heading.

  

Filter the DatabaseTo filter the list, for example to view orders for one Product, choose a criterion from one of the dropdown lists. To further filter the list, choose from another column's dropdown list, e.g. Customer.

Rows that don't meet the criteria will be hidden. Rows that remain visible have a blue number in the row button. The dropdown arrow for column(s) in which a criterion has been applied will also be blue.

 

 

Page 26: Live Excel Formula Feeds You Can Subscribe To

Remove a FilterTo remove the filter, and leave AutoFilter turned on:

In each column in which a filter has been applied, choose (All), the first item in the dropdown list ORFrom the Data menu, choose Filter, Show All

To remove the current filter, and turn off AutoFilter:

From the Data menu, choose Filter, AutoFilter

  

Special Filters

Blank Cells in a Column

Page 27: Live Excel Formula Feeds You Can Subscribe To

If there are any blank cells in the column, the drop down list will contain two additional items -- (Blanks) and (NonBlanks).Filter Highest and Lowest Numbers

To find the highest or lowest numbers in the table, choose (Top 10...) from the number column dropdown.

1. In the first box, choose Top or Bottom.2. In the middle box, enter a number.3. In the third box, choose Items or Percent.

Note: The results are the highest or lowest values

 

Page 28: Live Excel Formula Feeds You Can Subscribe To

for the entire list, not the currently filtered list. If other columns are also filtered, you may see fewer than the specified number of items.

Create a Custom FilterWhen you choose a criterion from a dropdown list, the list is filtered for rows that are equal to the criterion. If you need more options while filtering, you can choose (Custom...) from the dropdown list. This opens the Custom AutoFilter dialog box.

 

 

  

To filter for one criterion:

a) From the first dropdown list, select an operator.b) In the text box, type a value.c) Click OK.

To filter for two criteria:

a) From the first dropdown list, select an operator.b) In the text box, type a value.c) Choose And or Ord) From the second dropdown list, select an operator.e) In the text box, type a value.f) Click OK.