Applying Conditional Formatting for Multiple Conditions in Excel

If you are looking for some of the easiest ways to do Conditional Formatting for multiple conditions in Excel, then you will find this article useful.
Sometimes it becomes necessary to highlight a row for multiple conditions while working with a large dataset in Excel. This article will help you to know the ways of doing Conditional Formatting for multiple conditions based on another cell range in Excel.

preview of excel conditional formatting for multiple conditions

Here, I have the two data tables to demonstrate the ways of Conditional Formatting for multiple conditions in Excel. The first table has the sales record for different items of a company

Dataset 1 forexcel conditional formatting multiple conditions

and the second one contains the Order Date, Delivery Date, and Sales for some items of another company.

dataset 2 for excel conditional formatting multiple conditions

For creating the article, I have used Microsoft Excel 365 version, you can use any other version according to your convenience.


Method-1: Conditional Formatting for Multiple Conditions in One Column 

Here, we will attempt to do conditional formatting of a column based on multiple conditions in the Sales column. By using Conditional Formatting we will highlight the cells of the Sales column containing values less than $2000.00 and more than $5000.00.

selecting data

Steps:

  • Firstly, select the cell range on which you want to apply the Conditional Formatting.
  • Then, go to Home Tab>>Conditional Formatting Dropdown>>New Rule Option.

selecting new rule for conditional formatting

  • Then, the New Formatting Rule Wizard will appear.
  • Afterward, select the Format only cells that contain option.

new formatting rule box

  • Further, choose the following in the Format only cells with: Option Cell Value, less than, 2000 consecutively.
  • Click Format Option.

setting new formatting rule box

  • After that, the Format Cells Dialog Box will open up.
  • Select Fill Option.
  • Choose any Background Color.
  • Lastly, click on OK.

setting fill color

  • After that, the Preview Option will be shown below, and press OK.

preview in new formatting rule box

  • Now, you will get the cells having a value less than $2000.00 highlighted.

single condition for one column

  • Follow Step-01 of this method.
  • After that, you will get the following New Formatting Rule Dialog Box.

setting new formatting rule box

  • Choose the following in the Format only cells with: Option Cell Value, greater than, 5000.
  • Click Format Option.

setting new formatting rule box

  • After that, the Format Cells Dialog Box will open up.
  • Select the Fill option.
  • Choose any Background Color.
  • Lastly, click on OK.

selecting color for conditional formatting

  • Then, the Preview option will be shown as below, and press OK.

preview in new formatting rule box

  • Finally, you will get the cells highlighted for a value less than $2000.00 and more than $5000.00.

excel conditional formatting multiple conditions result

Read More: How to Apply Conditional Formatting on Multiple Columns in Excel


Method-2: Using AND Function to Apply Conditional Formatting for Multiple Conditions in Excel 

While dealing with multiple conditions in different columns you can use the AND function, this will highlight the rows only when both conditions are met.
Assume, you want to highlight the rows which have a Sales Person named Richard and a sales value greater than $5,000.00, and to do this you can use the AND function here.

selecting data from two columns

Steps:

  • Firstly, Select the data range on which you want to apply the Conditional Formatting.
  • Then, go to Home Tab>>Conditional Formatting Dropdown>>New Rule Option.

new rule for conditional formatting

  • Then, the New Formatting Rule Wizard will appear.
  • Afterward, select Use a formula to determine which cells to format option.

new formatting rule box

  • Again, click on Format Option.

setting new formatting rule box

  • After that, the Format Cells Dialog Box will open up.
  • Select Fill Option.
  • Choose any Background Color.
  • Lastly, click on OK.

selecting color

  • After that, the Preview option will be shown as below.

preview in new formattinf rule box

  • Afterward, write the following formula in the Format values where this formula is true: box
=AND($C5="Richard",$E5>5000)
  • Press OK.

applying AND function

Note: When the string of Column C matches Richard and the sales values of Column E are Greater than 5000, then the Conditional Formatting will appear in those rows.
  • After that, you will get a row fulfilling both conditions highlighted.

excel conditional formatting for multiple conditions result

Read More: Conditional Formatting Based on Multiple Values of Another Cell


Method-3: Using OR Function to Apply Conditional Formatting for Multiple Conditions in One Column 

For dealing with multiple conditions you can use the OR function as well, unlike the AND function it will highlight the rows if any of the criteria is met.
Suppose, you want to highlight the cells of a single column based on multiple conditions on the Sales column. You can use the OR function to highlight the cells of the Sales column containing values less than $2000.00 and more than $5000.00.

selecting data

Steps:

  • Primarily, follow Step-01 of Method-2.
  • After that, you will get the following New Formatting Rule Dialog Box.

new formattinf rule box setting

  • Type the following formula in the Format values where this formula is true: Box
=OR($E5<2000,$E5>5000)
  • Press OK

OR function for a single column

Note: When the sales value of Column E is Less than 2000 or Greater than 5000, then the Conditional Formatting will appear in those rows.
  • In this way, you will get the cells highlighted for a value less than $2000.00 or more than $5000.00.

excel conditional formatting for multiple conditions result

Read More: How to Format Cell Based on Formula in Excel


Method-4: Conditional Formatting for Multiple Conditions Using OR Function in Excel

For dealing with multiple conditions in different columns we will use the OR function here. We will highlight the rows that have a North Region or sales value greater than $5,000.00.

selecting data

Steps:

  • Primarily, follow Step-01 of Method-2.
  • After that, you will get the following New Formatting Rule Dialog Box.

New Formatting Rule Dialog Box

  • Type the following formula in the Format values where this formula is true: Box
=OR($D5= “North”,$E5>5000)
  • Press OK

applying OR function

Note: When the string of Column D matches North and the sales values of Column E are Greater than 5000, then the Conditional Formatting will appear in those rows.
  • Afterward, you will get the rows fulfilling any one condition highlighted.

excel conditional formatting for multiple conditions result


Method-5: Using the IF Function for Conditional Formatting with Multiple Conditions in Excel

In this section, we are using the IF function for highlighting rows that have fulfilled multiple conditions. For this purpose, we have added a column named Helper.

selecting data

Steps:

  • Firstly, select the output cell F5.
  • Then, type the following formula
=IF(C5="Richard",IF(D5="West",IF(E5>5000,"Matched","Not Matched"),"Not Matched"),"Not Matched")

applying IF function

Note: IF will return Matchedif the three conditions given here are met, otherwise Not Matched.
  • Press ENTER
  • Then, drag down the Fill Handle Tool.

using fill handle

  • Now, we will get Matched only for a row where all of the three conditions have been met, and then we will highlight this row.

IF function result

  • Follow Step-01 of Method-2.
  • After that, you will get the following New Formatting Rule Dialog Box.

New Formatting Rule Dialog Box

  • Type the following formula in the Format values where this formula is true: Box
=$F5="Matched"
  • Press OK

insewrting formula in New Formatting Rule Dialog Box

Note: When the values of Column F are Equal to “Matched”, then the Conditional Formatting will appear in those rows.
  • Afterward, you will get the row fulfilling all of the conditions highlighted.

excel conditional formatting for multiple conditions result

Read More: Excel Conditional Formatting Formula with IF


Method-6: Using AND Function for Multiple Conditions Including Condition for Dates

Let’s say, you want to highlight the rows that have delivery dates after today (today’s date is 12-15-21 and the date format is mm-dd-yy) and sales value greater than $5,000.00, and to do this you can use the AND function here.

selecting data

Steps:

  • Firstly, follow Step-01 of Method-2.
  • After that, you will get the following New Formatting Rule Dialog Box.

New Formatting Rule Dialog Box

  • Type the following formula in the Format values where this formula is true: Box
=AND($D5>TODAY(),$E5>5000)
  • Press OK

AND function for dates

Note: When the dates of Column D will be greater than TODAY() (gives today’s date) and the sales values of Column E will be Greater than 5000, then the Conditional Formatting will appear in those rows.
  • After that, you will get the last row fulfilling both conditions highlighted.

excel conditional formatting multiple conditions result


Method-7: Conditional Formatting for Empty and Non-Empty Cells in Excel

If you want to highlight the rows corresponding to the Delivery Dates that are empty (to explain this method I have the dates from the three cells of the Delivery Date column and one cell of the Order Date column) that means not delivered yet and the Order Dates which are non-empty, then you can follow this method.

selecting data for excel conditional formatting with multiple conditions

Steps:

  • Firstly, follow Step-01 of Method-2.
  • After that, you will get the following New Formatting Rule Dialog Box.

New Formatting Rule Dialog Box

  • Type the following formula in the Format values where this formula is true: Box
=AND($C5<>"",$D5="")
  • Press OK.

Empty and non-empty cells

Note: When the cells of Column C are not equal to Blank, and Column D is equal to Blank, then the Conditional Formatting will appear in those corresponding rows.
  • Then, you will get the rows highlighted when the corresponding cells of the column Order Date will be non-empty and the column Delivery Date will be empty.

excel conditional formatting for multiple conditions result

Read More: Conditional Formatting for Blank Cells in Excel


Method-8: Conditional Formatting for Multiple Conditions in One Column Using AND Function

If you want to highlight the cells of a single column based on multiple conditions in the Sales column. You can use the AND function to highlight the cells of the Sales column containing values of more than $2000.00 and less than $5000.00.

selecting data

Steps:

  • Firstly, follow Step-01 of Method-2.
  • After that, you will get the following New Formatting Rule Dialog Box.

New Formatting Rule Dialog Box

  • Type the following formula in the Format values where this formula is true: Box
=AND($E5>2000,$E5<5000)
  • Press OK.

AND function for a single column

Note: When the sales value of Column E will be greater than 2000 or Less than 5000, then the Conditional Formatting will appear in those rows.
  • In this way, you will get the cells highlighted for a value of more than $2000.00 and less than $5000.00.

excel conditional formatting multiple conditions result


Download Practice Workbook

You can download the practice workbook from here to practice yourself.


Conclusion

In this article, I tried to cover the easiest ways to do Conditional Formatting for multiple conditions in Excel effectively. Hope you will find it useful. If you have any suggestions or questions, feel free to share them with us.


Conditional Formatting for Multiple Conditions in Excel: Knowledge Hub

<< Go Back to Conditional Formatting | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Tanjima Hossain
Tanjima Hossain

TANJIMA HOSSAIN is a marine engineer who enjoys working with Excel and VBA programming. For her, programming is a handy, time-saving tool for managing data, files, and online tasks. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. She holds a B.Sc. in Naval Architecture & Marine Engineering from BUET and is now a content developer. In this role, she creates tech-focused content centred around Excel and VBA. Apart from... Read Full Bio

2 Comments
  1. I am trying to do a conditional format when a specific Cell is blank and another cell with a date is less than 30 days, leave blank or greater than 30, 60 or 90 days fill with a color for each category. And if the original cell has a value, ignore the dates and leave blank. As example.
    Date Fields are in Column A and Data fields are Column B.
    Column A Column B
    1/1/2022 Cleared
    2/1/2022
    3/1/2022 Cancelled

    I want to be able to use a multiple value option in Conditional formatting.

    • Hello Gabrielle, after going through your problem, I have understood it like this that you want to highlight those dates which are greater than 30 days (or January month) or 60 days (or February month), or 90 days (or March month) and the corresponding specific cells are blank for these dates. If the specific cells are not blank, then the coloring should be avoided. After understanding this scenario, I have created the following dataset like your sample to illustrate the process.
      dataset
      • Firstly, select the dates, and then go to the Home tab >> Conditional Formatting dropdown >> New Rule option.
      conditional
      • In the opening dialog box, choose the indicated option and then type the following formula in the box
      =AND(B2=””,OR(A2>DATEVALUE(“1/30/2022”),A2>DATEVALUE(“2/28/2022”),A2>DATEVALUE(“3/31/2022”)))
      • Click on Format
      formula
      • In the Format Cells dialog box go to the Fill tab >> select your desired color >> press OK.
      format
      Then, the following result will appear.
      result

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo