0% found this document useful (0 votes)
23 views

Lab Activity 4

This document discusses conditional formatting and filtering lists in Excel. It covers highlighting cells based on conditions, using data bars and color scales to visualize values, sorting lists alphabetically and numerically, and filtering lists to show only certain rows of data. Exercises are included to practice these skills, such as highlighting bottom 20% of hours, formatting columns with icons, and sorting or filtering tables in various ways.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Lab Activity 4

This document discusses conditional formatting and filtering lists in Excel. It covers highlighting cells based on conditions, using data bars and color scales to visualize values, sorting lists alphabetically and numerically, and filtering lists to show only certain rows of data. Exercises are included to practice these skills, such as highlighting bottom 20% of hours, formatting columns with icons, and sorting or filtering tables in various ways.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Lab 4: Conditional Formatting and Lists

Conditional formatting
Conditional formatting allows you to make data trends stand out visually.

Open the file excellab4.xslx and navigate to the condForm sheet. Let us say we would like to quickly
view who has OT (Over Time hours) more than 10 hours.

First, start by selecting your data range:

In the Home tab, click on Conditional Formatting in the Styles group. Move the mouse pointer over
Highlight Cells Rules, and then click Greater Than.

Lab 4: Conditional Formatting and Lists


39
In the dialog box that pops up, Enter 10. Notice that you can modify the way that the cells are formatted
by choosing the fill and text colors from the drop down list labeled with. For this exercise, leave the
formatting as light red for the fill and dark red for the text. Click the OK button when you are done.

Now, OT hours that are greater than 10 have been highlighted.

Lab 4: Conditional Formatting and Lists


40
Exercise 1
Highlight the Hours that are in the bottom 20%. Format them so that they have a Yellow Fill with Dark
Yellow Text. (Hint: use Top/Bottom Rules).

Other conditional formatting features allow you to get a quick overview of the values of all cells in a
range. One of them is data bars. Data bars assign the longest bar to the largest value in a list and the
shortest bar to the smallest value. The values in between are then given bars according to their
respective values. Let us apply this to the Total column.

Select the range of cells under the Total heading. Click on the Conditional Formatting button and
navigate to the Data Bars menu. Select the Purple Data Bar button.

Lab 4: Conditional Formatting and Lists


41
The data bars now provide you with a quick relative view of the total amounts employees earn.

Using color scales also gives you a similar result as data bars. Both features allow you to get a quick view
of how your data values compare to one another. The 2-color scales assign one color to the maximum

Lab 4: Conditional Formatting and Lists


42
value and another to the minimum. The values in between get assigned “in-between” colors. In
addition, the 3-color scales assign a color to a selected midpoint. The colors and values assigned to them
can be modified by selecting Manage Rules under the Conditional Formatting header.

You can also delete rules by selecting the cells where you would like to clear the rules, then navigating
to the Clear Rules menu under Conditional Formatting. Click on Clear Rules from Selected Cells.

Exercise 2
After you have cleared the data bars rule from the Total column, apply the Green-Yellow-Red color
scale.

Exercise 3
Edit this rule so that the maximum value is shown in a pretty sky blue color.

The final aspect of conditional formatting we will cover is icon sets. When using icon sets, each cell is
provided with an icon depending on its value. There are no gradients in icon sets.

Let us format the Rate column using icon sets. Select the cells in the Rate column and apply the 3 traffic
lights (rimmed) formatting to them, as shown below.

Lab 4: Conditional Formatting and Lists


43
As you can see below, Excel assigns the icons based on its own calculations.

If you want to change the way that the icons are assigned, you need to edit the rule (Manage Rules). As
you can see below, Excel is currently assigning the Green icon to values >= the 67 percent. What this

Lab 4: Conditional Formatting and Lists


44
means is that Green icons will be assigned to values >= 67 percent between the lowest value (8.5) and
the highest (15). In this case, the minimum value associated with 67 percent is 0.67*(15-8.5)+8.5. This is
12.9. In other words, Excel calculates these percentages by assigning 100% to the highest value in the
range and 0% to the lowest.

Let us change the type of values to Percentile instead of Percent.

Notice the changes in the distribution of icons.

Lab 4: Conditional Formatting and Lists


45
Percentiles do not calculate the percentages within ranges of values. Percentiles are based on the order
of a value among the other values. Values <= the 33 percentile means that red icons will be assigned to
the bottom 4 values. If you are interested in the Math, this is because 0.33*13 (the number of values) =
4.29.

What you need to understand about this is that percentages are calculated relative to the lowest and
highest values when percentiles are calculated based on the position of a value in the ordered list of
values.

Exercise 4
Format the OT Rate column using the 3 flags icon style. The cells should show a RED flag if its value is
>=20, a YELLOW flag if its value is <20 and >=15, and GREEN otherwise.

Lab 4: Conditional Formatting and Lists


46
Sorting lists
Sorting a list or sorting an entire table are both functions that will most likely come up whenever you are
doing data analysis. You can easily sort data in alphabetic, numeric, or even chronological order.

Let us try sorting our table by the ascending alphabetic order of the names of the employees. Select the
range of names in the table. Then in the Home tab, under the Editing group, select Sort A to Z.

A warning message pops up:

What this message is telling us is that with the current selection, only the names column will be sorted.
The data in the rest of the table will not be sorted. This is why we need to select the “Expand the
selection” radio button. This will allow the entire table to be sorted according the alphabetic order of
the names. Press the Sort button. The entire table has now been sorted.

Lab 4: Conditional Formatting and Lists


47
Exercise 5
Sort the table through the Hours column, from largest to smallest.

Excel also lets us perform more complicated sorting. Let us try to sort the table by the cell icons of the
Rate column.

Select the entire table. Under Sort and Filter, select Custom Sort.

Lab 4: Conditional Formatting and Lists


48
The custom sort dialog box pops up.

This dialog box shows the column headers in our table, how we want to sort them, and what order we
want them in.

Select Rate as the Sort by column, and then select for it to be sorted on Cell Icon. The order menu now
shows the three icons used in the Rate column. Let us ask for the green icon to be placed on top, as
shown below.

Lab 4: Conditional Formatting and Lists


49
Now we can add another level of sorting so that the red icon is at the bottom. Click on the Add Level
button in the dialog box. Select Rate and Cell Icon again. This time, make sure the red icon is ordered on
the bottom, and then click the OK button.

Lab 4: Conditional Formatting and Lists


50
This is what your table should look like:

Exercise 6
Use custom sort to sort the table in the descending order of the OT Rate and then in ascending order of
the names of the employees.

Filtering lists
Filtering in Excel allows you to show only the rows of data you are concerned with, and hide all other
data temporarily.

Open the filters sheet in excellab4.xslx.

One obvious use for filters here is to view the sales information of only a few regions of interest. Let us
see how this can be done.

Start by selecting the Region column. Under the Home tab and in the Editing Group, select the Sort and
Filter button. Select Filter from the menu.

Lab 4: Conditional Formatting and Lists


51
Notice that there is now an arrow next to the Region header. This arrow means that a filter can be
applied to this column, but no filters are currently being used.

Lab 4: Conditional Formatting and Lists


52
Click the arrow next to the Region header. Let us only show the data for sales in the East region. One
way to do this is to deselect NW and SW as shown below.

Now, only the rows showing information from either the NE or SE are shown. Notice the button next to
the region header has changed to a filter icon indicating that a filter has been applied.

Lab 4: Conditional Formatting and Lists


53
There is another way by which the same result can be achieved. First let us remove the applied filter.
Click on the button next to Region and select “Select All”. Click the OK button.

Now that we can see our original data, let us add a new filter. Select the arrow next to Region and move
the mouse cursor over Text Filters. Choose Ends With.

Lab 4: Conditional Formatting and Lists


54
In the dialog box that pops up, enter E as shown below. This will only show the rows in which the Region
ends with an E. Click on the OK button.

Now let us remove the filter by clicking on the button next to Region and selecting Clear Filter from
“Region” from the menu.

Lab 4: Conditional Formatting and Lists


55
Exercise 7
Create a new filter that only shows the data for salespeople who have joined after May 2004, and
before or during May 2008. Filter this further so that it only shows the ones who have sales less than
$6000 or greater than $12000.

Exercise 8
Remove the previous filters from the table. Show only the rows from the months April, May, and June
of all the years (2nd quarter). From those rows, only show the ones with Sales above the average.

Lab 4: Conditional Formatting and Lists


56

You might also like