Você está na página 1de 11

Formulas and Conditional Formatting

In addition to the charts we have learned to create, the Excel program offers a variety of
formulas that can help you interpret the data in a table. Formulas can be used to perform
a variety of mathematical operations on a row or column of data. This tutorial will guide
you through using two common formulas on a table of data. If you wish to experiment
Selec
with operations covered in this tutorial, select the Formulas and Cond Formatting tab
t
from the Excel workbook that is a companion to this tutorial.
For
mula
s
and
Con
d
For
matt
ing
Sum Formula
Tab
In this chart, a teacher has recorded performance on an 8 question quiz that she gave
students at the end of the week to assess quickly whether they understood concepts she
taught that week. We can use the formula function in Excel to calculate how many
concepts the students in the class have mastered.

Select the cell at the end of the row labeled Jordan (cell K4). To let Excel know that you
want to enter a formula in a cell, you begin by typing an equal sign in that cell. When
you do this, note that the information in the formula bar changes; Excel understands that

this cell will contain a formula and therefore provides some options that will be helpful to
you. Move your cursor up to the arrow next to the word AVERAGE. Excel is guessing
that you would like to produce an average value. Since what you want is a sum, click on
the small downward-facing arrow to the right and choose the SUM option.

2. Formula Bar is activated


and offers a list of common
functions

3. Select
SUM from
the list of
functions

1. Enter
= in cell
K4

After you click SUM, you will see the Function Arguments box. Excel will
automatically fill in the range of cells it believes you want to add. Excel defaults to
assuming that you want to sum all the numbers to the left of the selected cell. Check to
be sure that C4:J4 is entered in the Number 1 range box. If it is not, you can change
the range in the Number 1 box. Click OK.

The number 6 should now appear in cell K4 indicating that Jordan has mastered 6 of the
8 concepts covered in class that week. You can apply this function to all rows in the table
by using the copy feature. To do this, position the cursor at the bottom right corner of
cell K4 until a small cross appears. Click, hold and drag the cross down until all rows of
the table are selected. Release the mouse button and Excel will give the sum of each row
of data in the table. Label this column Total Concepts Correct.
Average Formula
Suppose the teacher of this class wanted to know what percentage of her class answered
each type of question correctly. We can use the average function to calculate this. Return
to the table and select cell C20. Type an equal sign in the cell and then click on the arrow
in the formula bar and select AVERAGE.

In the Function Arguments box, check to make sure the range is listed as C4:C19 and
click OK. Apply the formula to all the columns of the table using the same copying
procedure we used for the SUM formula. Label this row Percent of Students Correct on
this Concept.
You can now format these cells to change the decimals to percentages. Highlight all the
numbers in row 19 and then right-click. Select the Format Cells option and then
choose the Number tab. Select the Percentage option under the Category heading and
then change the decimal places option to zero. Click OK.

These formulas allow the teacher to easily see which students are not mastering an
acceptable number of concepts per week, and which concepts are not being mastered by
an acceptable percentage of the class.
Conditional Formatting
Another way to make the data in a table easier to interpret is to use conditional
formatting. Suppose we wanted to highlight all of the instances when a student answered
a question incorrectly so that it would be easier to see patterns. Conditional formatting
allows you to mark only those rows or columns that satisfy the parameters that you set.
The first step of conditional formatting is to highlight the data that you wish to format.
Select all the data in the table along with the row and column headings. Do not select the
SUM column or the AVERAGE row that you just added. Select Format from the menu
bar and choose the Conditional Formatting option.

The conditional formatting dialog box will now appear. Under the Condition 1
heading, it will say Cell Value is. Tab to the next field and click the arrow that allows
you to choose the condition you want the cell to satisfy. Since we want Excel to highlight
all cells that contain a 0, choose equal to. Tab to the next box and type 0. Now
select the Format button below these fields. Select the Patterns tab and choose a color for
the formatted cells (we are choosing bright yellow). Note: you might want to avoid dark
colors here as they will make the underlying data difficult to see.

Although this way of formatting the table does draw attention to the incorrect answers, it
could be even more powerful to format the table to draw attention to those students in the
class that answered relatively more items incorrectly or to those items that were relatively
difficult for students.
To do this, select the table once again. This time we will change Condition 1 to highlight
students that answered correctly on fewer than 6 of the covered concepts. This will
require us to have Excel look at the total number of concepts answered correctly and use
this to decide which rows to highlight.
Start by choosing the Formula is option in the first field. There is a long box to the
right of this option; this is where we will tell Excel which cells to look at
In the formula entry box, enter the following formula: =$K3<6. All formulas in Excel
must begin with an equal sign, so make sure this is part of any formula or conditional
formatting that you do. The $ before the K indicates that we are fixing our attention on

column K which contains the sums of each row. There is no $ before the 3, because we
want Excel to look at each of the rows in the selected range. (It is extremely important to
be clear about which aspects of a cell address are fixed and which are not. If you do not
put the dollar sign in the correct place, your formatting formula will not work properly.)
Finally, by including < 6, we are telling Excel to format only those rows in which the
sum of correct answers is less than 6. Your conditional formatting box should now look
like this:

Click OK. Your table should have highlighted rows for those students who did not pass 6
or more of the covered concepts.

You can apply up to 3 different conditional formats to a range of cells. Suppose we want
this same data table also to highlight concepts that at least 75 percent of the class did not
answer correctly. Once again, highlight the table data and the column headings but not
the cells containing the formulas. Select Format from the menu bar and choose the
Conditional Formatting option. Choose the Add button at the bottom of the
Conditional Formatting dialog box and a new condition should appear.
Select the Formula is option from the drop down menu and enter in the following
formula: =B$20<.75. Notice the position of the dollar sign in this equation. This
indicates that the row number is fixed at row 20, but that Excel is free to vary the column
number in order to check the averages for each of the different concepts.

Select the Format button from the Conditional Formatting box and choose the Pattern tab
from the Format Cells box and select a new color for the column formatting (we have
chosen bright pink). Click OK on the Format Cells box and the Conditional Formatting
box. The table will now show the students mastering less than 6 concepts in yellow and
concepts mastered by less than 75 percent of the students in pink.

There may be times when you want to remove one or more conditional formats from a
data table. In order to do this, highlight the data that contains the formatting and select
the conditional formatting option. When the Conditional Formatting box appears, click
on Delete at the bottom of the box. You will then be given the option of selecting which
of the three possible conditions you would like to remove. Click OK on the Delete
Conditional Formatting box and then click OK on the Conditional Formatting box.

2. Select Condition
1
3. Click OK

1. Select Delete

4. Click OK

Adding Data
You will notice that the last student in the list has no data in the row. Since conditional
formatting is a dynamic function, you can alter the data in the table and the formatting
will reflect the changes. Return to the table and select cell C18. Enter values for this
student two initial zeroes followed by ones. As you near the end of the row, you will
notice that some of the pink columns disappear as well as the yellow formatting across
the students row.

Você também pode gostar