More than Three Conditional Formats

by Allen Wyatt
(last updated February 28, 2015)

1

The conditional formatting feature of Excel is very powerful. For complex formatting, however, there is one drawback for most Excel users: The conditional formatting feature only seems to allow up to three conditions to be defined.

This is actually a bit misleading. There are actually four conditional formats that can be specified. The fourth one is the format that is used by Excel if none of the three conditions specified in the Conditional Formatting dialog box is true. (In other words, the way you format the cell to begin with is the fourth format.)

If you simply need to define additional conditions, without the need of corresponding formats, you can design formulas to use in the conditions. These formulas can use the OR, AND, and NOT functions. For instance, if you want cell B5 to be colored red when the cell value is outside the range of 5 to 10, or it is not a number, you can use the following condition:

=OR(B5<5,B5>10,NOT(ISNUMBER(B5)))

In order to enter this formula into the Conditional Formatting dialog box, make sure you specify "Formula is" instead of "Cell Value Is" in the condition. You would then change the formatting for the condition in the dialog box so that it is red. Similar "compound formulas" can be designed for other complex conditional needs.

If you need to define additional conditions—more than three—and you need different formats for each of the conditions, then you are out of luck. In that instance, you will need to use VBA macros to check your conditions and modify cell formats accordingly. (You could also upgrade to a later version of Excel—2007 or later—as these later versions will easily handle more than three conditional formats.)

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2439) 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

Non-printing Page Borders

With your page border in place, you might be surprised if you don't see one side of the border (or all sides) print out with ...

Discover More

Fonts Unavailable in Word

If you have some fonts that don't show up as available in Word, their exclusion can be confusing. Here's a discussion of why ...

Discover More

Searching for Floating Graphics

Graphics can be added to a document so that they are either inline with the text or floating over the text. You can use ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

MORE EXCELTIPS (MENU)

Shading Rows with Conditional Formatting

If you need to shade alternating rows in a data table, you'll want to examine how you can accomplish the task with ...

Discover More

Diagonal Borders in a Conditional Format

Conditional formatting is a great tool for changing how your data looks based on the data itself. Excel won't allow you to ...

Discover More

Conditional Formatting

One of the powerful features of Excel is the ability to format a cell based on the contents of that cell or another. It is ...

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 for this tip:

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}] in your comment text. You’ll be prompted to upload your image when you submit the comment. 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 three minus 0?

2015-02-28 05:32:44

Barry

Conditional formatting has only three outcomes (i.e. formats) but the conditions can be multiple by using the formula option when setting the condition up.

For example you could set the conditional formatting on cell A1 so this its back change to, say, Red if cells B1=2, C1=3, D5>0, Average of cells E1 to E10 is greater than 2, etc etc this would use the formula =OR(B1=2, C1=3, D5>0, AVERAGE(E1:E10)>2). The formatting is the same but in this example there are 4 conditions that result in the Red background (the outcome).

The formula can be as complex as you want to make it, and can use both relative and absolute addressing.


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.

Links and Sharing
Share