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

Using the Copy or Move Text Keys

Most people use the Clipboard to copy and move text in Word. Before the Clipboard, Word used F2 to move text and Shift+F2 ...

Discover More

Determining How Many Windows are Open

Does your macro need to know how many windows Excel has open? You can determine it by using the Count property of the ...

Discover More

Dealing with Hyperlinks that Won't Work

You can add hyperlinks to a worksheet and Excel helpfully makes them active so that when you click them the target of the ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (menu)

Protecting Your Conditional Formatting Rules

If you have conditional formatting applied in a worksheet, the formulas in those formats may not be as secure as you ...

Discover More

More than Three Conditional Formats

Conditional formatting is a great feature for making the data in your worksheets more understandable and usable. What if ...

Discover More

Conditional Formatting Based on Date Proximity

Conditional formatting can be used to draw your attention to certain cells based on what is within those cells. This tip ...

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 3 - 0?

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.