Conditional Formatting

Written by Allen Wyatt (last updated September 10, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003


Excel includes a powerful feature that allows you to dynamically change the formatting of individual cells based on the results being displayed in that cell. For instance, you could make the text in the cell larger and red if a result is less than a certain threshold. Likewise, you could color the background of a cell based on the result of a formula.

To take advantage of conditional formatting, follow these steps:

  1. Enter your cell formula as you normally would.
  2. Choose Conditional Formatting from the Format menu. Excel displays the Conditional Formatting dialog box. (See Figure 1.)
  3. Figure 1. The Conditional Formatting dialog box.

  4. Use the controls in the dialog box to specify the threshold or ranges you want to set for formatting to be changed.
  5. Click on the Format button. Excel displays the Format Cells dialog box. (See Figure 2.)
  6. Figure 2. The Format Cells dialog box.

  7. Make the changes in the dialog box to indicate how you want the cell to be formatted if your condition (entered in step 3) is met.
  8. Click on OK to close the Format Cells dialog box.
  9. Click on the Add button and define more conditions (and formats), if desired.
  10. Click on the OK button to close the Conditional Formatting dialog box.

It is possible to get very creative with conditional formatting. However, it is not the answer to every formatting need. If you want to be even more creative (you know—bordering on outlandish), you can always develop a macro that will examine all the cells in your sheet or a specific range of cells you select and then change formatting in any way you wish.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2665) applies to Microsoft Excel 97, 2000, 2002, and 2003.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Putting a Different Date in a Header

Today's date is easy to add to a header, but what if you want to add a date that is adjusted in some manner? Adding ...

Discover More

Hiding and Protecting Columns

Want to hide certain columns within a worksheet so the contents are not visible to others? The answer lies in formatting ...

Discover More

Specifying Location for a Message Box

When writing macros, you may want to position a message box at a specific location on the screen. This can't be done in ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (menu)

Conditionally Formatting Non-Integers

The conditional formatting capabilities of Excel are very helpful when you want to call attention to different values ...

Discover More

Noting Inactivity within a Timeframe

There are many times when you are creating a worksheet that you need to analyze dates within that worksheet. Once such ...

Discover More

Changing Coordinate Colors

Tired of the default colors that Excel uses to display the row and column coordinates? You can modify the colors, but ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 5 - 3?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.