TECHNOLOGY EXCEL - Strategic Finance · will have to build a formula that eval-uates to True/False...

2
You might want to highlight cells that contain values outside certain bound- aries. For example, you might want open invoices that are more than 60 days old to display in red. This month’s article will describe three methods for highlighting such cells. Old School: Using a Custom Number Format This method predates the conditional formatting methods but still works. Say that you want to display all aging values of 60 or more in a red font. Follow these steps: 1. Select the range of cells that contain aging values. 2. Type Ctrl+1 to display the Format Cells dialog. 3. On the Number tab, choose the Cus- tom category. 4. In the Type box, enter “[Red][>59]0;0” (see Figure 1). 5. Click OK. That custom number format has two zones separated by the semicolon. The first zone indicates that it should be used for values greater than 59. The font col- or is red, and the days should be dis- played without any decimals. You need to finish the format with “;0” to make sure that the values less than or equal to 60 still appear. If you didn’t specify a “0” for those cells, the smaller values would be hidden. The color names that may be speci- fied in the custom number format are limited to black, green, white, blue, magenta, yellow, cyan, or red. You can also use [Color 1] through [Color 56] to specify the 56 colors shown in the Col- ors dialog (go to Office Button, Excel Options, Save, and press the “Colors…” button). Using a color index requires a great deal of experimentation, as the 56 colors in the Color dialog don’t appear in sequential order. Using Simple Conditional Formatting Excel 2007 and Excel 2010 offer many simple conditional formatting rules. To set up a rule, select the range of cells containing aging. From the Home tab, choose Conditional Formatting, Highlight Cells Rules, Greater Than. In the Greater Than dialog, type “59” in the first box and click OK. Any cells greater than 59 will be highlighted with a light red fill and dark red text (see Figure 2). You can use the dropdown box in the Greater Than dialog to choose from six built-in formats, or choose Custom For- mat to build your own. In Excel 2003 or earlier, you would follow these steps: 1. Select the range of cells containing aging values. 2. On the Format menu, select Conditional Formatting. 3. Set the second dropdown to “greater than or equal to” in the Conditional Formatting dialog. 4. Type “60” in the value box in the dialog. 5. Click the Format button in the dialog. 6. Choose a Font color, fill color, or both. 7. Click OK twice to return to the worksheet. Using Powerful Formula-Based Conditional Formatting For the most flexibility, you’ll want to use a formula-based conditional format. These formats can highlight all of the data in a row when one value is over a certain value. To set up a rule, follow these steps: 1. Select the entire range of data. 52 STRATEGIC FINANCE I February 2011 TECHNOLOGY EXCEL Three Ways to Highlight Outliers By Bill Jelen

Transcript of TECHNOLOGY EXCEL - Strategic Finance · will have to build a formula that eval-uates to True/False...

Page 1: TECHNOLOGY EXCEL - Strategic Finance · will have to build a formula that eval-uates to True/False for this cell. 3. From the Home tab, choose Condi-tional Formatting, New Rule…

You might want to highlight cells that

contain values outside certain bound-

aries. For example, you might want open

invoices that are more than 60 days old

to display in red. This month’s article will

describe three methods for highlighting

such cells.

Old School: Using aCustom Number FormatThis method predates the conditional

formatting methods but still works. Say

that you want to display all aging values

of 60 or more in a red font. Follow these

steps:

1. Select the range of cells that contain

aging values.

2. Type Ctrl+1 to display the Format Cells

dialog.

3. On the Number tab, choose the Cus-

tom category.

4. In the Type box, enter “[Red][>59]0;0”

(see Figure 1).

5. Click OK.

That custom number format has two

zones separated by the semicolon. The

first zone indicates that it should be used

for values greater than 59. The font col-

or is red, and the days should be dis-

played without any decimals. You need

to finish the format with “;0” to make

sure that the values less than or equal to

60 still appear. If you didn’t specify a “0”

for those cells, the smaller values would

be hidden.

The color names that may be speci-

fied in the custom number format are

limited to black, green, white, blue,

magenta, yellow, cyan, or red. You can

also use [Color 1] through [Color 56] to

specify the 56 colors shown in the Col-

ors dialog (go to Office Button, Excel

Options, Save, and press the “Colors…”

button). Using a color index requires a

great deal of experimentation, as the 56

colors in the Color dialog don’t appear in

sequential order.

Using SimpleConditional FormattingExcel 2007 and Excel 2010 offer many

simple conditional formatting rules. To

set up a rule, select the range of cells

containing aging. From the Home tab,

choose Conditional Formatting, Highlight

Cells Rules, Greater Than. In the Greater

Than dialog, type “59” in the first box

and click OK. Any cells greater than 59

will be highlighted with a light red fill

and dark red text (see Figure 2).

You can use the dropdown box in the

Greater Than dialog to choose from six

built-in formats, or choose Custom For-

mat to build your own.

In Excel 2003 or earlier, you would

follow these steps:

1. Select the range of cells containing

aging values.

2. On the Format menu, select

Conditional Formatting.

3. Set the second dropdown to “greater

than or equal to” in the Conditional

Formatting dialog.

4. Type “60” in the value box in the

dialog.

5. Click the Format button in the dialog.

6. Choose a Font color, fill color, or both.

7. Click OK twice to return to the

worksheet.

Using Powerful Formula-Based Conditional FormattingFor the most flexibility, you’ll want to use

a formula-based conditional format.

These formats can highlight all of the

data in a row when one value is over a

certain value.

To set up a rule, follow these steps:

1. Select the entire range of data.

52 S T R AT E G IC F I N A N C E I Fe b r u a r y 2 0 1 1

TECHNOLOGY

EXCELThree Ways toHighlight Outliers

By Bill Jelen

Page 2: TECHNOLOGY EXCEL - Strategic Finance · will have to build a formula that eval-uates to True/False for this cell. 3. From the Home tab, choose Condi-tional Formatting, New Rule…

2. Note the active cell address that

appears to the left of the formula bar.

In Figure 3, the active cell is A2. You

will have to build a formula that eval-

uates to True/False for this cell.

3. From the Home tab, choose Condi-

tional Formatting, New Rule…

4. In the New Formatting Rule dialog,

choose “Use a formula to determine

which cells to format.”

5. Type a formula to calculate if the

invoice is >= 60 days old. The formula

should use dollar signs if you are

pointing to cells other than the active

cell. The formula is “=(TODAY()-

$C2)>=60” in our example. The $

before the C ensures that the format

for each column will always look to

column C of the current row. You

don’t include a dollar sign before the

2 in $C2 so that the row number can

change as Excel calculates formats for

other rows.

6. Click the Format button. Choose a

combination of font color, fill color,

font size, bold, italic, and

so on. Click OK to close

the Format dialog.

7. Click OK to close the New

Formatting Rule dialog.

In Excel 2003 or earlier,

you would select Format,

Conditional Formatting in

step 3. Then change the first

dropdown from “Cell Value

Is” to “Formula Is.”

As you see in Figure 3, the

advantage of the formula

method is that you can high-

light the entire row when a

certain condition is met. SF

Bill Jelen is the host of

MrExcel.com. His Power

Excel seminar for Excel 2010

is now available from QUE:

LiveLessons Power Excel

2010. Send questions for

future articles to

[email protected].

Fe b r u a r y 2 0 1 1 I S T R AT E G IC F I N A N C E 53

Figure 1

Figure 2

Figure 3