In this article:

Conditional Formatting with Multiple Conditions in Google Sheets

May 8, 2024

In this article we will show you how to apply conditional formatting with multiple conditions in google sheets. Simply follow the steps below.

For the purpose of the following examples a sample data set has been created. Follow along by clicking this link to access.

When we consider multiple conditions some users may want to use multiple rules while some users want to use multiple conditions in their custom formula. We will explain both in this article.

Conditional Formatting using Multiple Conditions in a Custom Formula

In Google Sheets we can write a single custom formula that specifies multiple conditions, in the example below we will use this method to apply conditional formatting to all cells where the two conditions are met.

In our example we have a list of 8 people, the amounts of money owed and if they have paid. We want to apply formatting to the names of anybody matching the following two conditions:

Paid = “Yes”

Owed: >30 (Amount greater than 30)

We will demonstrate how to apply conditional formatting to any cells matching both these conditions using a single custom formula.

1. Highlight the cell or range of cells you want to apply the conditional   formatting to. 

Select the cell or cell range you want to include in the conditional formatting by clicking and dragging over the cells to highlight them.

To highlight separate cells press and hold the Ctrl key (Cmd ⌘ for mac) and click on the individual cells.

In our example we will select all cells containing data except the header row.

google sheets conditional formatting multiple conditions

2. Click "Format" in the File Menu, followed by "Conditional formatting"

From the file menu select Format then click Conditional formatting.

multiple conditional formatting google sheets

3. In the "Conditional Format Rules" Expand the “Format Rules If…” dropdown menu, then click "Custom formula is."

The Conditional format rules menu will now display on the right hand side of the display.

In the section labeled Format rules expand the Format cells if… drop down menu. Scroll to the bottom and select Custom formula is.

multiple conditional formatting google sheets

4. Enter the custom formula

An input box will appear just below the “Format cells if” dropdown menu, here you can enter the custom formula in the following format:

=AND/OR ($Cell_Ref>Value,$Cell_Ref=Value)

Formula Breakdown:

=AND/OR: The AND function specifies that ALL conditions need to be met whereas the OR function specifies that any of the conditions need to be met for the formatting to be applied.

() Formula references need to be enclosed in brackets at the start and the end following the function.  

$Cell_Ref: This is the cell reference of the column the formula will check starting from the row number specified in your selection. It is important to know the row number must start at the same number as your selection, you must use the $ symbol before the cell reference if you want to include the entire column. 

>: This is the greater than operator, it is used to compare the Value with the Cell_Ref value.

Value: The value is what the formula will check against. Any text based values must be enclosed in double quotations (“ ”) numerical values do not require any quotations.

Our example formula:

=AND($B2>200,$C2="yes")

Our example implemented below will highlight the cells meeting both conditions of values over 200 in Column B AND the text value “yes” in column C.

multiple conditional formatting google sheets

5. Apply the formatting options 

The formatting style section gives you the option to edit the data in a variety of ways. Text can be amended to be bold, italic, underlined, stricken through as well as the color of the text and the cell can be changed. 

In our example we have changed the cell background to green. 

google sheets conditional formatting multiple conditions

6. Click “Done” to see results 

Click the done button to apply the formatting. 

As can be seen in our example, the formatting has only been applied to the cells where the value of the B column is greater than 200 and the value of the C column is Yes. 

google sheets conditional formatting multiple conditions

Conditional Formatting using Multiple Rules in Google Sheets

Another method of conditional formatting with multiple conditions is to use multiple rules.

In this example we will use multiple conditions to apply formatting to the cells where the text value in Column C = “no” using one rule. Then a second rule for cells where the text value in Column A = “John”.

1. Highlight the cell or range of cells you want to apply the conditional   formatting to. 

Select the cell or cell range you want to include in the conditional formatting by clicking on the bottom cell and dragging over the cells to highlight them.

To highlight separate cells press and hold the Ctrl key (Cmd ⌘ for mac) and click on the individual cells.

In our example we will select all cells containing data except the header row.

google sheets conditional formatting multiple conditions‍

2. Click "Format" in the File Menu, followed by "Conditional formatting"

In the file menu click Format then select Conditional formatting.

multiple conditional formatting google sheets

3. In the “Format Rules" Expand the “Format Rules If…” dropdown menu, then click "Custom formula is."

The Conditional format rules menu will now display on the right hand side of the display.

In the section labeled Format rules expand the Format cells if… drop down menu. Scroll to the bottom and select Custom formula is.

multiple conditional formatting google sheets

4. Enter the custom formula =$Cell_Ref=Value

Enter the new custom formula in the format below:

$Cell_Ref=Value

Formula breakdown:

$Cell_Ref: Cell reference of the column the formula will check starting from the row number selected The row number must start at the same number as your selection, you must use the $ symbol before the cell reference if you want to include the entire column. 

=Value: The value is what the formula will check against. Any text based values must be enclosed in double quotations (“ ”) whereas numerical values do not require any quotations.

In our example we want to highlight any cells where the text value is “no” in Column C

Our example formula is:

=$C2="no"

conditional formatting google sheets multiple conditions

5. Apply formatting style 

The formatting style section has options to edit the data in many ways. Text can be amended to be bold, italic, underlined, stricken through as well as the color of the text and the cell can be changed. 

In our example we will change the cell color to red.

conditional formatting google sheets multiple conditions

6. Click Add Another Rule 

The formatting has been applied to the cells where the value of the C column is the text ‘no’. 

We must now add another rule.

Below the done button, click Add another rule.

conditional formatting google sheets multiple conditions

7. Enter the new custom formula =$Cell_Ref=Value

The new formula will generate as a copy of the first one, in the text box type in the new custom formula in the format below:

$Cell_Ref=Value

Formula breakdown:

$Cell_Ref: Cell reference of the column the formula will check starting from the row number selected The row number must start at the same number as your selection, you must use the $ symbol before the cell reference if you want to include the entire column. 

=Value: The value is what the formula will check against. Any text based values must be enclosed in double quotations (“ ”) whereas numerical values do not require any quotations.

In our example we want to highlight any cells where the text value is “John” in Column A

Our example formula is:

=$A2="John"

conditional formatting google sheets multiple conditions

8. Apply formatting style 

Use the formatting style section to edit the data in different ways. Text can be amended to be bold, italic, underlined, stricken through as well as the color of the text and the cell can be changed. 

In our example we will change the cell color to green to highlight this data from the other rule.

multiple conditional formatting google sheets

9. Click “Done” to see results 

Click the done button to apply the formatting. 

As can be seen in our example, the formatting from our first rule has been applied to the cells where the value of the C column contains the text “yes”

We can also see that the formatting from the second rule has been applied to the cells where the value of A column contains the text ‘John’.

multiple conditional formatting google sheets

If you enjoyed this article, you might also like our article on how to apply conditional formatting to an entire row in Google Sheets or our article on how to change row color based on cell value in Google Sheets. 

If you want to learn how to do mail merge in Google Sheets, we also suggest checking out our detailed guide.

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.
Get your copy of our free Google Sheets automation guide!
  • 27 pages of Google Sheets tips and tricks to save time
  • Covers pivot tables and other advanced topics
  • 100% free

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->