Using Multiple Test Conditions

by Allen Wyatt
(last updated October 9, 2015)

3

You are not limited to a single test condition when using conditional formatting. Excel allows you to specify up to three conditions in the Conditional Formatting dialog box. To set multiple conditions, all you need to do is click on the Add button after you are done with each condition. Excel then expands the dialog box and allows you to enter another test and associated format.

This capability comes in handy when you want to test a cell for multiple specific values. For instance, let's say you wanted to apply different formatting when a particular cell's value was equal to either 200, 350, or 500. Excel makes this easy, simply by using multiple conditions.

If you decide to define multiple conditions, each condition is independent of the other. If you want more complex conditions, using Boolean operators such as AND or OR, then you should set up a formula for your conditional test, as described in other ExcelTips.

At some time while you are developing your conditional tests, you may want to delete one of the conditions. Excel makes this easy. All you need to do is click on the Delete button in the Conditional Formatting dialog box. If you have multiple conditions defined, Excel displays the Delete Conditional Format dialog box. Select which of your conditions you want deleted, and then click on the OK button. You can then continue to work in the Conditional Formatting dialog box, as desired.

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

Printing Document Properties

Word maintains quite a bit of information about a document in a special collection of items called "properties." You can ...

Discover More

Preventing the Left Margin of a Footer from Moving

When you print a document, does the position of the page footer seem to move left and right? This could have to do with how ...

Discover More

Deleting a Page

Want to delete the current page? There is no automatic command to perform this task in Word, but you can create your own ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (menu)

Highlighting Cells Containing Specific Text

If you want to highlight cells that contain certain characters, you can use the conditional formatting features of Excel to ...

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 only if ...

Discover More

Copying Conditional Formatting

Conditional formatting is a great feature in Excel. Here's how you can copy conditional formats from one cell to another in a ...

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}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 8Mpixels. 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 6 - 4?

2012-09-11 13:20:41

Ajith Nuwan Rathnaweera

Results of two subjects are tabulated under two columns. To pass the exam, students have to score more than 40% from each subject. How do you test this condition and display the result as "PASS" OR "FAIL"?


2012-05-28 12:18:15

Barry Fitzpatrick

Using the formulas option on each condition you can have multiple conditions, however, you can only have three formatting options.

Also the order of the conditions can be important as the formatting used will be that for the first of the three conditions which are met. E.g. is condition 1 is to show say an orange background if the value is, say, above 500, and condition 2 would show red if the value is above 1000 then then the formatting would be orange for any value above 500 including values of 1000 and above. To make this work properly Conditions 1 & 2 need to be the other way around.


2012-05-28 11:59:07

jmj

Conditional formatting is great, BUT...

Everybody should know that sorting a table with conditionally formatted cells will wreak havoc on you table, because conditional formats are linked to the POSITIONS of the cells, and not to the cells themselves!


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.