Applying Conditional Formatting for Multiple Conditions in Excel

Here’s an overview of using Conditional Formatting for multiple conditions.

preview of excel conditional formatting for multiple conditions

We have the two data tables, which we’ll format. The first table has the sales record for different items of a company

Dataset 1 forexcel conditional formatting multiple conditions

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

dataset 2 for excel conditional formatting multiple conditions


Method 1 – Conditional Formatting for Multiple Conditions in One Column 

We will highlight the cells of the Sales column containing values less than $2,000.00 and more than $5,000.00.

selecting data

Steps:

  • Select the cell range where you want to apply the Conditional Formatting.
  • Go to the Home tab, select the Conditional Formatting dropdown, and choose New Rule.

selecting new rule for conditional formatting

  • The New Formatting Rule wizard will appear.
  • Select the Format only cells that contain option.

new formatting rule box

  • Choose the following in the Format only cells with: options: Cell Value, less than, 2000.
  • Click Format.

setting new formatting rule box

  • The Format Cells Dialog Box will open up.
  • Select Fill.
  • Choose any Background Color.
  • Click on OK.

setting fill color

  • The Preview will be shown below. Press OK.

preview in new formatting rule box

  • Press OK again and you will get the cells having a value less than $2,000.00 highlighted.

single condition for one column

  • Insert a New Formatting Rule for the same range.

setting new formatting rule box

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

setting new formatting rule box

  • The Format Cells dialog box will open up.
  • Select the Fill option.
  • Choose a different Background Color.
  • Click on OK.

selecting color for conditional formatting

  • The Preview will be shown as below. Press OK.

preview in new formatting rule box

  • Press OK again and you will get the cells highlighted.

excel conditional formatting multiple conditions result

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


Method 2 – Using the AND Function to Apply Conditional Formatting for Multiple Conditions in Excel 

We want to highlight the rows which have a Sales Person named Richard and a sales value greater than $5,000.00.

selecting data from two columns

Steps:

  • Select the data range on which you want to apply the Conditional Formatting.
  • Go to the Home tab.
  • Choose Conditional Formatting.
  • Select New Rule.

new rule for conditional formatting

  • The New Formatting Rule wizard will appear.
  • Select Use a formula to determine which cells to format.

new formatting rule box

  • Click on Format.

setting new formatting rule box

  • Choose a color in the Fill tab.
  • Click on OK.

selecting color

  • The Preview will be at the bottom.

preview in new formattinf rule box

  • Use 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 5,000, the Conditional Formatting will modify those rows.
  • You will get a rows 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 the OR Function to Apply Conditional Formatting for Multiple Conditions in One Column 

We want to highlight the cells of the Sales column containing values less than $2,000.00 or more than $5,000.00.

selecting data

Steps:

  • Select the column.
  • Go to New Rule in Conditional Formatting.

new formattinf rule box setting

  • Use the following formula in the Format values where this formula is true: box.
=OR($E5<2000,$E5>5000)
  • Choose a color in Format if you want.
  • Press OK.

OR function for a single column

  • Here’s the result.

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 the OR Function in Excel

We will highlight the rows in the North Region or which have a sales value greater than $5,000.00.

selecting data

Steps:

  • Select the dataset.
  • Go to Conditional Formatting and select New Rule.
  • You will get the following New Rule dialog box.

New Formatting Rule Dialog Box

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

applying OR function

  • Here’s the result.

excel conditional formatting for multiple conditions result


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

We have added a column named Helper.

selecting data

Steps:

  • Select the output cell F5.
  • Insert the following formula:
=IF(C5="Richard",IF(D5="West",IF(E5>5000,"Matched","Not Matched"),"Not Matched"),"Not Matched")

applying IF function

  • Press Enter.
  • Drag down the Fill Handle tool.

using fill handle

  • 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

  • Select the cell range where you want to apply the Conditional Formatting.
  • Go to the Home tab, select the Conditional Formatting dropdown, and choose New Rule.

New Formatting Rule Dialog Box

  • Use 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

  • Here’s the result.

excel conditional formatting for multiple conditions result

Read More: Excel Conditional Formatting Formula with IF


Method 6 – Using the AND Function for Multiple Conditions Including Dates

We 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 a sales value greater than $5,000.00.

selecting data

Steps:

  • Select the cell range where you want to apply the Conditional Formatting.
  • Go to the Home tab, select the Conditional Formatting dropdown, and choose New Rule.
  • You will get the following New Formatting Rule dialog box.

New Formatting Rule Dialog Box

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

AND function for dates

  • Here’s the result.

excel conditional formatting multiple conditions result


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

We’ll highlight the sales that have not been delivered (i.e. there’s an order date, but no delivery date).

selecting data for excel conditional formatting with multiple conditions

Steps:

  • Select the cell range where you want to apply the Conditional Formatting.
  • Go to the Home tab, select the Conditional Formatting dropdown, and choose New Rule.
  • You will get the following New Formatting Rule dialog box.

New Formatting Rule Dialog Box

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

Empty and non-empty cells

  • Here’s the result.

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 the AND Function

We want to highlight the cells of the Sales column containing values between $2,000.00 and $5,000.00.

selecting data

Steps:

  • Select the cell range where you want to apply the Conditional Formatting.
  • Go to the Home tab, select the Conditional Formatting dropdown, and choose New Rule.
  • You will get the following New Formatting Rule dialog box.

New Formatting Rule Dialog Box

  • Use 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

  • Here’s the result.

excel conditional formatting multiple conditions result


Download the Practice Workbook


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