by Allen Wyatt
(last updated February 28, 2015)
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:
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.
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!
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
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
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
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."