26
Intermediate Excel 2007: Data Analysis Tools Working with data as an Excel table............................................................................ 1 Setting up data correctly ......................................................................................................... 1 Using the Format as Table command for quick-and-easy formatting and data analysis .......... 1 Understanding the Table Tools Design ribbon ........................................................................ 2 Adding a total row to your table .............................................................................................. 2 Expanding your table .............................................................................................................. 3 Things to know about using formulas in an Excel table ........................................................... 3 Converting a table back to a normal set of cells...................................................................... 4 Tools for analyzing your data ...................................................................................... 4 Using the Subtotals command ................................................................................................ 4 Using Excel’s outlining tools ................................................................................................... 5 Working with the subtotal rows ............................................................................................... 6 Using the Remove Duplicates command ................................................................................ 6 Using the Consolidate command ............................................................................................ 7 Using Excel’s filters ................................................................................................................ 8 Understanding filter options .................................................................................................... 9 Filtering by a single value ......................................................................................................10 Filtering by multiple items ......................................................................................................10 Clearing a filter or filters .........................................................................................................10 Refreshing filters ...................................................................................................................11 Working with date filters ........................................................................................................11 Using the Custom Filter command.........................................................................................12 Conditional formatting ................................................................................................ 12 Working with data bars ..........................................................................................................12 Customizing data bars ...........................................................................................................13 Controlling data bars for outlying data ...................................................................................14 Working with heat maps ........................................................................................................14 Converting a three-color heat map to monochrome ...............................................................14 Working with icon sets ...........................................................................................................15 Modifying the placement of icon sets .....................................................................................15 Reversing the icon set’s sequencing .....................................................................................16 Applying “highlight cells” conditional formatting .....................................................................16 Using the comparative “Highlight Cells” options.....................................................................17 Finding the “greater/less than or equal to” options .................................................................17 Comparing dates ...................................................................................................................18 Searching for values in a text cell ..........................................................................................19 Finding duplicate or unique values ........................................................................................19 Using the Top/Bottom rules ...................................................................................................20 Deleting conditional formatting ..............................................................................................20 Changing the order in which conditional formats are applied .................................................21 Sorting.......................................................................................................................... 22 Quick and easy sorting ..........................................................................................................22 Using the Custom Sort window ..............................................................................................22 Editing a custom sort .............................................................................................................23 Sorting by color or icon ..........................................................................................................23 Creating a case-sensitive sort ...............................................................................................24 Using left-to-right sort to reorder columns ..............................................................................24 Creating a random sort ..........................................................................................................24

Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

  • Upload
    others

  • View
    36

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools

Working with data as an Excel table ............................................................................ 1 Setting up data correctly ......................................................................................................... 1 Using the Format as Table command for quick-and-easy formatting and data analysis .......... 1 Understanding the Table Tools Design ribbon ........................................................................ 2 Adding a total row to your table .............................................................................................. 2 Expanding your table .............................................................................................................. 3 Things to know about using formulas in an Excel table ........................................................... 3 Converting a table back to a normal set of cells ...................................................................... 4

Tools for analyzing your data ...................................................................................... 4 Using the Subtotals command ................................................................................................ 4 Using Excel’s outlining tools ................................................................................................... 5 Working with the subtotal rows ............................................................................................... 6 Using the Remove Duplicates command ................................................................................ 6 Using the Consolidate command ............................................................................................ 7 Using Excel’s filters ................................................................................................................ 8 Understanding filter options .................................................................................................... 9 Filtering by a single value ......................................................................................................10 Filtering by multiple items ......................................................................................................10 Clearing a filter or filters .........................................................................................................10 Refreshing filters ...................................................................................................................11 Working with date filters ........................................................................................................11 Using the Custom Filter command .........................................................................................12

Conditional formatting ................................................................................................ 12 Working with data bars ..........................................................................................................12 Customizing data bars ...........................................................................................................13 Controlling data bars for outlying data ...................................................................................14 Working with heat maps ........................................................................................................14 Converting a three-color heat map to monochrome ...............................................................14 Working with icon sets ...........................................................................................................15 Modifying the placement of icon sets .....................................................................................15 Reversing the icon set’s sequencing .....................................................................................16 Applying “highlight cells” conditional formatting .....................................................................16 Using the comparative “Highlight Cells” options .....................................................................17 Finding the “greater/less than or equal to” options .................................................................17 Comparing dates ...................................................................................................................18 Searching for values in a text cell ..........................................................................................19 Finding duplicate or unique values ........................................................................................19 Using the Top/Bottom rules ...................................................................................................20 Deleting conditional formatting ..............................................................................................20 Changing the order in which conditional formats are applied .................................................21

Sorting .......................................................................................................................... 22 Quick and easy sorting ..........................................................................................................22 Using the Custom Sort window ..............................................................................................22 Editing a custom sort .............................................................................................................23 Sorting by color or icon ..........................................................................................................23 Creating a case-sensitive sort ...............................................................................................24 Using left-to-right sort to reorder columns ..............................................................................24 Creating a random sort ..........................................................................................................24

Page 2: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 1

Working with data as an Excel table

Previous versions of Excel had a “list” feature that allowed you to work with your data as a simple database. In Excel 2007, tables have replaced and improved upon the capabilities of lists. Some of the benefits of the new Format As Table command:

Automatic AutoFilter dropdowns on column headings

One-click access to autoformats such as banded rows or banded columns

Toggle on/off of a totals row

One-click access to a remove duplicates command

Automatic copying of new formulas to all cells in a column (this feature can be a bit disorienting)

Easily extend the table definition and conditional formatting to new data added to the original table

Setting up data correctly

Many of the new features in Excel assume that you have your information stored as a data set with the following characteristics:

Header row at the top of the worksheet

No completely blank rows

No completely blank columns If you have been in the habit of using blank rows or columns to differentiate parts of a worksheet, you will need to stop doing that in order to take full advantage of some new features (or learn the appropriate selection tricks to compensate for this habit). Examples of new features that work best with a correctly-organized data set: one-click sorting, the “Format as Table” command, automatic formula calculations. Note: it is okay to have blank cells in your worksheet, but not completely blank rows or columns. Once Excel encounters an empty row or column, it will stop doing whatever it is currently doing, even if you have 300 additional rows of data just below that point!

Using the Format as Table command for quick-and-easy formatting and data analysis

Depending on the type of data your worksheet contains, the fastest way to format may be the Format as Table command, found in the Home ribbon’s Styles group. Here’s what happens if you choose to apply the Format as Table command. Your worksheet data can now include the following:

Header row: Excel automatically selects the top row of data and adds autofilter buttons.

Total row: displays the sum of the last column of the table, if that column contains numeric values.

First column: assumes the first column contains row headings and formats them in bold.

Last column: assumes the last column contains row headings or totals and formats them in bold.

Banded rows: applies shading to every other row in the table.

Banded columns: applies shading to every other column Not all of these options will be applied automatically. You may need to check or uncheck boxes as necessary in the Table Tools Design ribbon’s Table Style Options group: To format as a table, select a cell within the data you want to format. Use one of the below options to create an Excel table:

Open the Home ribbon and select Format as Table from the Style group. Select an initial formatting style from the gallery of table styles.

Page 3: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 2

Open the Insert ribbon and click on the Tables command.

Use the keyboard shortcut: Ctrl + T

Use the old Excel 2003 shortcut for creating a list: Ctrl + L A new window appears asking for the location of the data to be included. If Excel has found the addresses correctly, click on the OK button; if not, click and drag to select the correct range of cells, and then click on the OK button.

Once you click on the OK button, Excel applies the formatting to your data and opens the Table Tools Design ribbon, where you can modify the formatting and features as needed.

Understanding the Table Tools Design ribbon

The screenshots below explain the different commands available on the Table Tools Design ribbon.

Adding a total row to your table

One of the best features about the Table command is the ability to add a total row to the table. Select a cell within the table and then open the Table Tools Design ribbon. Check the box beside Totals Row.

Click on this More button to see all the table formatting styles

Table Styles gallery

Name given to table (for use with formulas)

Opens the Resize Table window so you can expand the table

Opens the PivotTable wizard

Opens the Remove Duplicates wizard

Converts the table to a normal range of cells and removes all table-related features

Use the checkboxes in the Table Style Options group to turn on or off features of the table tool

Allows users to export to a SharePoint list

These commands are used when working with data that is stored somewhere else (a database, SharePoint list, etc.)

Page 4: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 3

The last row of the table now contains the ability to apply formulas to all columns. By default, the last column is set to Sum. To apply a formula to another column, select the cell, then click on the dropdown arrow and select the appropriate formula from the list. Note that the More Functions… command gives you the ability to open the Insert Function window and build a formula of your choosing.

If you no longer want to see the Totals row, uncheck the Total Row box in the Table Tools Design ribbon. If you turn the Totals row on again, it should remember the settings from the last time you used it, if applicable.

Expanding your table

Use one of these methods to expand the parameters of your table:

If you are in the last row of a table, hit the Tab key on your keyboard. Excel adds a new row to the table and moves the cursor to the first column in the new row.

Click in the first blank row below the table and enter data. As soon as you type something directly below an existing table, Excel automatically expands the table formatting to include that row. If for some reason you didn’t want the data to be part of the table, click on the AutoCorrect icon and select Undo Table AutoExpansion.

Add a new column by clicking in the blank cell to the right of the last column header and entering a new header. Just as with the row addition described above, Excel automatically expands the table formatting to include that column.

Expand the table manually by clicking on the lower-right corner of the last cell in the last column and dragging down to add new rows or across to add new columns.

Open the Table Tools Design ribbon and select Resize Table from the Properties group. A Resize Table window appears, where you can enter the new cell references for the table, or click and drag to select its new dimensions.

Things to know about using formulas in an Excel table

When you enter a formula that will run down a column (as opposed to formulas running across the last row), it will automatically be copied down the length of the table. A lightning bolt icon appears to the right of the column; if you click on its dropdown arrow, you can choose not to copy the formula down the column.

Note: if you don’t want Excel to use the same formula all through a column, you would enter the formula that is different, and after Excel has automatically copied it to the remaining cells, immediately hit the Undo button. The previous formula will reappear in the affected cells, except for the cell where you originally entered the new formula.

Any formulas use the headings to refer to cells within the table, rather than the standard row/column references you may be used to seeing.

This column contains text but is set to Count to give an item count for the table.

Page 5: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 4

Note: some people find this “natural language” formula feature intensely annoying. If you are one of them, follow these steps to turn it off:

1. Click on the Office button and select Excel Options from the lower-right corner. 2. Click on the Formulas category on the left side of the Excel Options window. 3. In the “Working with formulas” area, uncheck the box beside “Use table names in

formulas.” 4. Click on the OK button to finalize your change.

Converting a table back to a normal set of cells

Some Excel operations, such as subtotaling, don’t work on data that is formatted as a table. If you need to treat your data as a regular set of cells rather than a table, follow these steps to convert it back: Click to select a single cell within the table. Open the Table Tools Design ribbon and click on the Convert to Range command. A warning window appears; click on the Yes button to complete the conversion process.

Any formatting you had applied to the table remains, but you will notice that the Table Tools Design ribbon is no longer visible.

Tools for analyzing your data

Using the Subtotals command

The Subtotals command is one of those Excel operations that doesn’t work when data is set up as an Excel table. If you want to apply subtotals, first follow the directions in the “Converting a table back to a normal set of cells” section, and then proceed as described below. Sort your data as necessary to arrange your data properly. For example, if you want to view subtotals by department, sort by department. Select any cell within your data set. Open the Data ribbon and click on the Subtotal command in the Outline group. When the Subtotal window appears, specify the grouping level in the “At each change in” box. In the “Use function” box, specify the type of operation that should occur. In the “Add subtotal to” list, check the box beside the column header. If you are doing an item count, select the column where you want the results to appear. If you are performing a mathematical operation, select the column containing the data to be worked on.

Page 6: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 5

If you’re creating a new subtotal and want to replace the existing subtotals in your data, click on the checkbox beside “Replace current subtotals.” If you leave that box unchecked, Excel adds additional subtotals to those you have already created. If your list is sufficiently large, you might want to check the box beside “Page break between

groups.” This could save you a step if you will need to print the list later. If you want to see both subtotals and a grand total at the bottom of the list, check the box beside “Summary below data.” Otherwise, the subtotals and grand total appear as the first entry in each group and the grand total at the top of the column just below the row of field names. Consider the overall size of your list before making this decision—if it’s important to see the final

result without having to flip through several pages of data, leave this box unchecked. When you’ve made all necessary choices, click on the OK button.

Using Excel’s outlining tools

When the results of a subtotaled list appear, several useful outlining tools appear along the left-hand side of the list. Once your subtotals are in place, these buttons allow you to expand or roll up data quickly. Row level symbols: a set of numbers indicating the number of levels represented by the data in your list. To roll up or expand all the data to that level, click on the number. Hide Details button: click on the Hide Details button for a specific group of data to roll it up so that it is not displayed. Show Details button: click on the Show Details button to expand the list so you can view all the details of that group.

Outlining tools

Subtotal

Grand total appearing at bottom of list

Outlining tools Subtotal

Grand total appearing at top of list

Page 7: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 6

This screenshot shows a rolled-up CT total, and an expanded MA total (with specific details included).

Working with the subtotal rows

You may want to apply special formatting to the subtotal result rows, or move that data elsewhere—for a summary page, or as part of another spreadsheet. To do so, follow the directions below to select only those rows, rather than all of the underlying data as well. Select the subtotal rows (note: rolling up to level 2 will be the easiest way to do this). Click on the F5 key to open the GoTo window. Click on the Special button in the lower-left corner. In the GoTo Special window, select Visible Cells Only and then click on the OK button. Although it may be hard to tell by looking at the screen, now only the subtotal rows are selected, instead of all the hidden rows as well. At this point you can apply special formatting, copy those rows and paste them elsewhere, or do whatever else you need to do to them.

Using the Remove Duplicates command

The Remove Duplicates command can be a wonderful tool, or it can make you the most miserable person in the office. When you use the Remove Duplicates command, it really does remove the duplicates—they are deleted from your worksheet. So remember, always start messing with the Remove Duplicates command by making a copy of your original data and storing it elsewhere for safekeeping. Select a single cell in your data. Open the Table Tools Design ribbon and click on the Remove Duplicates command. If your data is not formatted as a table, open the Data ribbon and select Remove Duplicates from the Data Tools group. Excel should automatically select the entire table and then open the Remove Duplicates window, where you will see a list of all the column headers for your table.

Hide Details button Show Details button

Row level symbols

Page 8: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 7

Uncheck the boxes for the columns you don’t want to have Excel consider while looking for duplicates; keep in mind that the more columns you select, the smaller number of duplicates it will (most likely) find. Once you have checked or unchecked the appropriate boxes, click on the OK button. A new window appears telling you how many duplicate values Excel found and deleted, and how many unique values are left.

Click on the OK button to complete the process. If you want to undo the removing of duplicates, click on the Undo command or use the keyboard shortcut: Ctrl + Z.

Using the Consolidate command

The Consolidate command can be helpful in combining the data contained in multiple records. For example, if employees from multiple locations enter purchases into an expense log, you might want to show the totals for each location. You could use the Subtotals command for this option, but the advantage of the Consolidate command is that it allows you to pull in data from multiple locations and put it in a separate spot. Click on the cell where you want the table of consolidated data to appear. Open the Data menu and select the Consolidate command from the Data Tools group. When the Consolidate window appears, check the boxes beside “Top row” and “Left column” in the “Use labels in” area. Enter the cell references to be consolidated into the Reference box, or click on the collapse button beside the textbox so the Consolidate window rolls up and can be moved out of the way while you are selecting the cells to be consolidated.

If necessary, click on the collapse button again to expand the window. Once the correct cell references have been entered, click on the OK button. Note: if you needed to consolidate data from several locations, use the Add button after each entry to create a list of locations, and then click on the OK button.

Click here to collapse the window so you can select the correct group of cells.

Page 9: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 8

A new, much smaller table appears where you had selected a cell initially. Unfortunately, the left-hand column will not be labeled, and the data is not sorted in any way, so you may need to fix those two issues before presenting your consolidated data.

Using Excel’s filters

Excel’s filter options are automatically included when you format a data set as a table, but they can also be used with a regular range of data to do any of the following:

Filter by color or icon set, as well as by the contents of the cell.

Filter text columns based on cells that begin with a value, end with a value, or contain a value

Filter number columns based on cell data that is greater than, less than, or between specified values.

Filter number columns that are in the top (or bottom) 10, above average, or below average.

Filter date columns by year, month, or conceptual terms such as this month or year to date.

Filter by the contents of a specific cells, value, color, font color, or icon. Use one of these methods to turn on Excel filters:

Format your data as a table, which automatically applies filters.

Right-click a cell, select Filter from the shortcut menu, and then select the desired option from the dropdown menu. Applying a filter to a specific cell also turns on the filter options for all other columns.

Open the Home ribbon, click on the Sort and Filter command, and then select Filter from the dropdown menu.

Open the Data ribbon, click on the Sort and Filter command, and then select Filter from the dropdown menu.

Once the filter command is turned on, each column heading has a dropdown arrow on its right side.

The consolidated table has only 31 lines, compared to 657 in the original table.

Filter applied to column headings

Page 10: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 9

Understanding filter options

The options you get when clicking on the dropdown arrow depend on the type of value in the column. A number format gets these options:

A text column gets these options:

Page 11: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 10

A date column gets these options:

Filtering by a single value

To filter by one particular value, you can right-click on the cell, select Filter from the shortcut

menu, and then select the appropriate option from its dropdown menu. Another way to filter by a single value is to click on that column’s dropdown arrow and select that value from the list of available filters. First, click on the Select All box so that it deselects all values. Then select the particular value by which you want to filter. Click on the OK button at the bottom of the filter list to apply the filter.

Filtering by multiple items

To filter by more than one value, you must use the filter dropdown arrow. First, click on the Select All box so that it deselects all values. Then, select all of the values by which you want to filter. Click on the OK button at the bottom of the filter list to apply the filter.

Clearing a filter or filters

Use one of the below options to undo filters:

Use one of these options to filter by a single criteria.

Page 12: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 11

To clear the filter from only one column, click on the filter dropdown arrow and select Clear Filter from Column.

Open the Data ribbon, click on the Sort & Filter command, and select Clear. This option clears all filters but leaves the filter dropdown arrows so that you can reapply them later, if needed.

Open the Data or Home ribbon and click on the Filter command. This clears all filters and turns off the filter dropdown arrows.

Refreshing filters

One of the unfortunate things about filters is that they don’t automatically update if you add new rows or edit your data. To force Excel to refresh the filters, you must reapply them using one of these methods:

Open the Data ribbon, click on the Sort & Filter command, and select the Reapply command.

Open the Home ribbon, click on the Sort & Filter command, and select the Reapply command.

Right-click a single cell, select Filter from the shortcut menu, and then select Reapply from the dropdown menu.

Working with date filters

When you click on the dropdown arrow for a date column, you will notice that the list of dates has been aggregated by years. Click on the plus sign beside a year to see months within the year, and then click on the month’s plus sign to see the dates within that month that are represented in the column.

If you don’t like this feature and want to turn it off, click on the Office button and then click on the Excel Options button in the lower-right corner. When the Excel Options window opens, click on the Advanced category on the left side of the screen. Scroll down to the Display for This Workbook section, select the relevant workbook, if necessary, and then uncheck the box beside “Group Dates in the AutoFilter Menu.”

Page 13: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 12

Using the Custom Filter command

At the bottom of the list of type-specific filters available for a column is the Custom Filter command, which allows you to combine multiple conditions using AND or OR clauses. For example, if I wanted to filter by a range of dates within a particular column, I would click on the filter dropdown arrow, select Date Filters, and then select Custom Filter. In the Custom AutoFilter window, enter the appropriate range of dates and then click on the OK button to apply the filter.

Conditional formatting

Conditional formatting allows you to set formats that appear on your worksheet if data meet a certain criteria. Some examples of how you might use conditional formatting:

Build data bars to compare values among a set of cells

Heat maps

Identify cells that are above or below average

Identify duplicate values

Identify specific dates

Add color scales based on a cell’s value

Add color, italics, patterns, etc. based on a cell’s value Excel 2007 introduces three new types of conditional formatting: data bars, heat maps, and icon sets.

Working with data bars

When you apply conditional formatting using data bars, you create a comparison among a set of cells. The cells containing the smallest value in the selected range will only have a little bit of color on the left side of the cell, while the cells containing the largest value will have up to 90% of the background filled with the designated color. This formatting option gives users a quick visual guide to the cells and is a big improvement over previous versions of Excel, where this sort of color formatting was much less sophisticated. Select the range of cells; be sure you don’t include the cell containing the total for the column, because it will throw off the formatting of all the other values. Open the Home ribbon and select Conditional Formatting from the Style group. Hover over the Data Bars command until its dropdown menu appears. Select one of the six colors shown there; as you hover over the different options you can see them applied to your data.

Page 14: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 13

Customizing data bars

You can modify the data bars colors or the size used for the largest and smallest data bars. Open the Home ribbon and select Conditional Formatting from the Style group. Select Manage Rules. In the “Show formatting rules for” area, select This Worksheet. All the rules applied to your

current worksheet will appear. Select the data bar rule you want to modify and then click on the Edit Rule button. The Edit Formatting Rule window appears. To change the bar color, click on the Bar Color dropdown arrow and select one of the colors shown there, or click on the More Colors… command at the bottom of the dropdown to open

the Colors window, where you can select from the standard palette or create your own color. Note: for an interesting variation on the standard color bar, check the “Show Bar Only” box. This will hide all of the numbers and only show the data bars. Click on the OK button to close both windows and see your color change applied to your data.

Change this to “This Worksheet.”

Page 15: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 14

Controlling data bars for outlying data

If most of your data falls within a certain range, outlying data points will distort the overall impact of the data bar tool. On the Edit Formatting Rule window shown above, you can specify what values get the largest and smallest values, so that outliers can be accounted for accurately. Open the Home ribbon and select Conditional Formatting from the Style group. Select Manage Rules. In the “Show formatting rules for” area, select This Worksheet. All the rules applied to your current worksheet will appear. Select the data bar rule you want to modify and then click on the Edit Rule button. The Edit Formatting Rule window appears. Change the Type to Number, and then enter in the number you want it to use as the lowest/highest value for comparison purposes. Any other outlying numbers will be formatted the same as whatever you specify for the lowest/highest value. If necessary, repeat this process for the highest value. Click on the OK button to close both windows.

Working with heat maps

Heat maps, also known as color scales, are quite similar to data bars, but instead of using different-sized bars to compare the values in a set of cells, they use gradients of a color set. Select the range of cells; be sure you don’t include the cell containing the total for the column, because it will throw off the formatting of all the other values. Open the Home ribbon and select Conditional Formatting from the Style group. Hover over the Color Scales option and select a style. Notes on color scale options:

The first four color sets use three colors and are effective for use onscreen or with color printers.

The last four color sets only use two colors, which makes them better for monochromatic printers.

Converting a three-color heat map to monochrome

Open the Home ribbon and select Conditional Formatting from the Style group. Select Manage Rules. In the “Show formatting rules for” area, select This Worksheet. All the rules applied to your current worksheet will appear. Select the heat map rule you want to modify and then click on the Edit Rule button. The Edit Formatting Rule window appears. Click on the Format Style dropdown button and change from 3-Color Scale to 2-Color Scale. As shown below right, the midpoint option drops out. Select white as the color for the lowest value, and a dark color for the highest value.

Page 16: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 15

Click on the OK button to close both windows. Your heat map should now be in shades of white-gray-black, which will be much easier to see when printed on a non-color printer.

Working with icon sets

The icon set tool for conditional formatting puts an icon in each cell to indicate the relative size of the value in the cell compared to other values in the range. Icons can show positive, neutral, and negative meanings. The icon is always left justified. A set can include three, four, or five different icons, as described below:

Three-icon sets: choose arrows, flags, traffic light symbols, signs, and three symbol sets (checkmark, exclamation point, X).

Four-icon sets: arrows, red-to-black circle set, cell-phone-like power bar indicators, traffic lights.

Five-icon sets: arrows, power bars, and five quarters (last row).

Note: your icon set choices should take into consideration whether the final result will be printed or viewed on a screen, because some of the icons rely on color differences that might be difficult or impossible to see when printed. Select the range of cells to which you want to apply the icon set. Make sure you don’t select header or total rows. Open the Home ribbon and select Conditional Formatting from the Style group. Hover over the Icon Sets command and select one of the icon sets.

Modifying the placement of icon sets

Because the icon sets are always left justified, it can be difficult to tell what icon belongs to what number when you have applied icon sets across a range of columns. There are a couple of ways to fix this problem:

Method 1: Center the numbers in their respective columns. This moves the values and

Page 17: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 16

icons somewhat closer:

Method 2: Left-justify the numbers (screenshot below, left). If that moves them TOO close together, click on the Increase Indent button until they are the desired distance apart, as shown in the screenshot below right:

Reversing the icon set’s sequencing

Generally when Excel applies an icon set, it is operating on the assumption that the higher number is better. However, if that is not true for your data, you can reverse the order in which the icon set is applied. Apply the icon set as you would normally, even though it is not valuing the data correctly. Select a single cell within the data. Click on the Conditional Formatting command and select Manage Rules. Click on the Icon Set rule you wish to modify, and then click on the Edit Rule button to open the Edit Formatting Rule window.

Check the “Reverse Icon Order” box near the bottom of the window. Click on the OK button to close both windows.

Applying “highlight cells” conditional formatting

The Highlight Cells options on the Conditional Formatting command are what were most commonly used in previous versions of Excel. You can choose to highlight cells based on the following conditions:

Greater than

Less than

Page 18: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 17

Between

Equal to

Text that contains: looks for specific text

A date occurring: use conceptual dates such as today, last week, next month, yesterday, etc.

Duplicate values: highlight records that are duplicates or not duplicates Note: the greater/less than or equal to option can be found by clicking on More Rules… at the bottom of the Highlight Cells menu

Using the comparative “Highlight Cells” options

The greater than, less than, between, and equal to options under Highlight Cells all work in the same way. Select the range of cells to evaluate.

Click on the Conditional Formatting command, select Highlight Cells, and then select the appropriate option. Enter the value used to compare all of the cells in the textbox on the left side of the window. Click on the dropdown arrow on the right to select different formatting options, if necessary. As you fill out the values, you can see the formatting applied to your range of cells. Once you’ve made all your choices, click on the OK button to complete the formatting process. Note: you can use a cell address as the point of reference for evaluating the range of cells. Type in the cell address or use the expand/collapse button to minimize the window so that you can select the appropriate cell. Once you see the cell address populate the textbox, proceed as described above.

Finding the “greater/less than or equal to” options

Select the range of cells to evaluate.

Enter the value used to evaluate the cells here.

Page 19: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 18

Click on the Conditional Formatting command, select Highlight Cells, and then select More Rules… from the bottom of the list. In the New Formatting Rule window, click on the dropdown arrow beside greater than (in the lower half of the window) and select either “greater than or equal to” or “less than or equal to.”

Enter a value or select a specific cell to use as a reference point. Click on the Format button to specify the type of formatting to be used for cells that meet this condition. Click on the OK button to apply your conditional formatting.

Comparing dates

The comparing dates option is only useful if you are working with dates that are relatively recent (less than one month past or into the future). For analysis of dates of a greater range, you will have to use the Manage Rules command to write your own rule. Select the range of cells to evaluate. Click on the Conditional Formatting command, select Highlight Cells, and then select A Date Occurring.

In the A Date Occurring window, click on the dropdown arrow to select the appropriate condition, and then select the type of formatting to apply. Click on the OK button to apply the formatting. Notes on the date types available:

The conceptual dates (yesterday, today, last week) operates according to the computer’s clock. If you open the workbook in two months, the rule automatically updates to (possibly) highlight different dates.

A week is the seven days that run from Sunday through Saturday. Choosing the “This Week” option highlights all days from Sunday through Saturday, including the current date.

“In the Last 7 Days” includes the current date and the six previous days.

Page 20: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 19

“This Month” includes all days in the current calendar month. “Last Month” is all days in the previous calendar month

Searching for values in a text cell

The “text that contains” feature of conditional formatting allows you to identify cells containing specific text, even if it is just part of a word a string of characters. Select the range of cells to evaluate. Click on the Conditional Formatting command, select Highlight Cells Rules, and then select Text That Contains… The Text That Contains window appears; by default it will contain the text contents of the first cell in the selected range. Enter the text you want it to look for, and then use the dropdown arrow on the right side to select the formatting to apply. As you make these changes you will see the selected text change accordingly.

Click on the OK button to apply the formatting.

Finding duplicate or unique values

Select the range of cells to evaluate. Click on the Conditional Formatting command, select Highlight Cells, and then select Duplicate Values. In the Duplicate Values window that appears, specify whether you want it to highlight duplicate or unique values, and then select the type of formatting you want applied. Click on the OK button to apply the formatting, which will look something like this:

Unique values Duplicate values

Page 21: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 20

Note: the Duplicate Values feature only identifies those values that appear more than once. If you want to eliminate duplicate values, you will need to use the Remove Duplicates command, which is discussed in the “Using the Remove Duplicates command” section. If you want to use the Duplicate Values feature to identify unique values, keep in mind that it really only identifies items that are found only once. The first instance of a duplicate values is not identified in any fashion.

Using the Top/Bottom rules

There are a number of options under the Top/Bottom Rules section of the Conditional Formatting command, but fortunately they all work in the same way. Select the range of cells to evaluate. Click on the Conditional Formatting command, select Highlight Cells Rules, and then select Top/Bottom Rules. Choose an option from the dropdown menu, and its window will appear. See notes below for

more information about the specific formatting choices.

Top 10 Items: highlights the highest values in the range of cells; you can specify any number of items.

Top 10%: highlights the highest values in the range of cells; you can enter a different percentage to be formatted, if necessary.

Bottom 10 Items: highlights the lowest values in the range of cells; you can change the number of items selected.

Bottom 10%: highlights the lowest values as a percentage of the whole; you can change the percentage formatted.

Above Average: highlights the values that are above average for the selected range of cells; this formatting recalculates as the numbers in the selected range change.

Below Average: highlights the values that are below average for the selected range of cells; this formatting recalculates as the numbers in the selected range change.

Click on the OK button to apply the formatting.

Deleting conditional formatting

There are two ways to remove conditional formatting once it has been applied. Each method has its own degree of sophistication, so the one you choose really depends on your needs. To get rid of all conditional formatting at once: Highlight the range of cells from which you want to remove any and all formatting. Click on the Conditional Formatting command, select Clear Rules, and then select the appropriate option from its dropdown menu.

Page 22: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 21

Clear Rules from Selected Cells: will remove all rules from the highlighted cells, but not from other parts of the current worksheet.

Clear Rules from Entire Sheet: will remove all rules from the worksheet, regardless of what cells are currently selected.

Make your selection, and the rule(s) will be removed. To get rid of only selected conditional formats, rather than all of them at once: Click on the Conditional Formatting command and then select Manage Rules…. When the Conditional Formatting Rules Manager window appears, select the rule you want to remove, then click on the Delete Rule button.

The rule is removed, and the other rules remain, to be applied in the same order as before. Click on the OK button. Note: neither of these options has a warning box that appears before the rule is deleted. Remember that if you decide that it was a mistake to delete a conditional formatting rule, you can use the Undo button to reverse that action, rather than having to rebuild the rule from scratch.

Changing the order in which conditional formats are applied

One of the improvements of Excel 2007 is that you are no longer limited to three conditional formats per cell. Instead, you can have as many conditional formats as necessary to make your analysis clear. Keep in mind that conditional formats are applied in reverse order; that is, the last rule you create will be the first one applied. Because of this quirk, it is good to keep in mind the process for changing the order of these rules. Click on the Conditional Formatting command and then select Manage Rules…. When the Conditional Formatting Rules Manager window appears, select the rule you want to move and then use the Move Up or Move Down button to rearrange its position.

Move Down

Move Up

Page 23: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 22

Repeat this process as necessary to get the rules in the right order. Click on the OK button to finalize your change(s).

Sorting

Quick and easy sorting

Access to sorting is streamlined in Excel 2007. You can now right-click on a single cell and select a sorting option from the shortcut menu.

You can also sort using the Home or Data ribbons:

Open the Home ribbon, move to the Editing group, and then click on the Sort & Filter dropdown and choose your sorting option from the dropdown.

Open the Data ribbon, move to the Sort & Filter group, and click on the A-Z or Z-A button to sort by ascending or descending values.

Using the Custom Sort window

The Sort window has also been redesigned to allow you to sort by up to 64 different levels. This window can be accessed by right-clicking or from either the Home or Data ribbons.

Right-click on a cell, select Sort from the shortcut menu, and then select Custom Sort.

Using the Home ribbon: Open the Home ribbon, move to the Editing group, and then click on the Sort & Filter dropdown and choose Custom Sort….

Using the Data ribbon: Open the Data ribbon, move to the Sort & Filter group, and click on the Sort button.

If your data has headers, make sure the “My data has headers” box is checked. In the first Sort by box, click on the dropdown arrow and select the first column for sorting the data. In the Sort On column, click on the dropdown arrow and choose a sorting option. Most of the

Page 24: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 23

time you will be sorting by values, but you may need to sort by colors or icons. For more information on that kind of sorting, see the “Sorting by color or icon“ section. In the Order column, specify the type of sort. To add the next sorting level, click on the Add Level command on the left side of the window. A new line appears, and you can follow the same process to create the sort specifications. Continue adding levels as needed; when you have finished, click on the OK button to complete the sorting process.

Editing a custom sort

If you need to modify your multi-level sort, reopen the Sort window.

Right-click on a cell, select Sort from the shortcut menu, and then select Custom Sort.

Using the Home ribbon: Open the Home ribbon, move to the Editing group, and then click on the Sort & Filter dropdown and choose Custom Sort….

Using the Data ribbon: Open the Data ribbon, move to the Sort & Filter group, and click on the Sort button.

To modify one of the sorting levels, click in the column and make any necessary changes. To change the order of the sorting levels, select a level and then use the Move Up or Move Down buttons. To remove one of the sorting levels, click to select it and then click on the Delete Level command on the toolbar, or click on the Delete key on your keyboard. Once you have finished your modification, click on the OK button to complete the sorting process.

Sorting by color or icon

Excel’s ability to sort by fill or font color applies to colors applied through traditional formatting or by conditional formatting. The only bummer about the ability to sort by color is that there is no default color sequence, so you must specify each step of the sorting process. In other words, if your spreadsheet contains eight different cell backgrounds, you must create eight different sort levels to spell out exactly how to sort the data. Select a cell within your data. Use one of the following methods to open the Custom Sort window:

Right-click on a cell, select Sort from the shortcut menu, and then select Custom Sort.

Using the Home ribbon: Open the Home ribbon, move to the Editing group, and then click on the Sort & Filter dropdown and choose Custom Sort….

Using the Data ribbon: Open the Data ribbon, move to the Sort & Filter group, and click on the Sort button.

In the Sort window, select the field you want to sort by color. In the Sort On column, click on the dropdown arrow and select Cell Color. In the Order column, select the color that should appear first. In the final column, select On Top. Tip: To specify the next color quickly, click on the Copy Level button on the toolbar. This duplicates the previous sort rule, and now all you need to do is select the second color in the sorting sequence.

Page 25: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 24

When you have specified the sort order for all colors used, click on the OK button to complete the sort process.

Creating a case-sensitive sort

In prior versions of Excel, sorts by text paid no attention to case—lowercase, uppercase, and proper case were all sorted the same. Now, if case matters to your sort, you can tell Excel to sort that way. Select a cell within your data. Use one of the following methods to open the Custom Sort window:

Right-click on a cell, select Sort from the shortcut menu, and then select Custom Sort.

Using the Home ribbon: Open the Home ribbon, move to the Editing group, and then click on the Sort & Filter dropdown and choose Custom Sort….

Using the Data ribbon: Open the Data ribbon, move to the Sort & Filter group, and click on the Sort button.

Choose the appropriate column in the Column dropdown list. Click on the Options button and then check the box beside “Case sensitive.” Click on the OK button to close the Sort Options window. Continue creating sorting levels, if necessary, and then click on the OK button to complete your sort.

Using left-to-right sort to reorder columns

In prior versions of Excel, the only way to reorder columns was by cutting and pasting them into the correct order. In Excel 2007, you can use a left-to-right sort to achieve the same end with much less pointing and clicking on your part. Note: Your best chance of success with this technique is to do it first thing. While this operation does work as advertised, Excel seems reluctant to allow you to choose a left-to-right sorting option once you’ve done much work on a spreadsheet—filtering, conditional formatting, other sorts of data manipulation. In your worksheet, insert a new blank row above the existing headings. In this row, number the columns in what the NEW sequence of columns should be. Select a cell within your data. Use one of the following methods to open the Custom Sort window:

Right-click on a cell, select Sort from the shortcut menu, and then select Custom Sort.

Using the Home ribbon: Open the Home ribbon, move to the Editing group, and then click on the Sort & Filter dropdown and choose Custom Sort….

Using the Data ribbon: Open the Data ribbon, move to the Sort & Filter group, and click on the Sort button.

Click on the Options button to open the Sort Options window. Click to select “Sort left to right” and then click on the OK button. The Sort by list under column now contains a list of row numbers. Select the row number that corresponds to the row where you created the correct order sequence earlier. Click on the OK button to complete your sort. Once the columns have been reordered, you can delete that additional row at the top where you specified the sort sequence.

Creating a random sort

Insert a new column on the right or left side of your data set. Enter a heading for this column—the name doesn’t matter. Click into the first cell below the heading and type this formula: =rand()

Page 26: Intermediate Excel 2007: Data Analysis Tools Data Analysis Tools...Intermediate Excel 2007: Data Analysis Tools ©2010 4 Note: some people find this “natural language” formula

Intermediate Excel 2007: Data Analysis Tools ©2010 25

Hit the Enter key on your keyboard, and the formula should automatically fill all the way down the dataset. If it doesn’t, hover over the lower-right corner of the cell until your cursor turns into a small black cross. Click and drag to fill the cells, or double-click to fill automatically. Each cell now contains a randomly-generated decimal between 0 and 1. Click on the heading for this column. Click on the Data ribbon, click on the Sort & Filter button, and then click on the A-Z button. The entire list will be sorted into a random sequence. Note: once the sort is completed, the formula recalculates so that it looks like the numbers are still in ascending order. However, the sort really has been randomized!! Delete the column containing the random numbers.