Mastering Conditional Formatting: Custom Formula Rules in Google Sheets

Danielle Jul 09, 2026

Google Sheets offers a powerful feature called Conditional Formatting, allowing you to apply specific formatting to cells based on predefined rules. One of the most versatile rule types is the 'Custom formula is' rule, which lets you apply formatting based on complex formulas. In this guide, we'll explore how to create and manage custom formula rules for conditional formatting in Google Sheets.

Google Sheets Tip: Conditional Formatting Custom Formulas – TCEA TechNotes Blog
Google Sheets Tip: Conditional Formatting Custom Formulas – TCEA TechNotes Blog

Before delving into custom formulas, let's briefly recap the basic steps to apply conditional formatting. First, select the cells you want to format. Then, click on 'Format' in the menu, hover over 'Conditional formatting', and choose 'Custom formula is'. Here, you can enter your custom formula and choose the formatting style.

How to address the current cell in conditional format custom formula?
How to address the current cell in conditional format custom formula?

Understanding Custom Formulas

Custom formulas in conditional formatting use the same syntax as regular Google Sheets formulas. They can reference other cells, use mathematical and logical operators, and even include functions like SUM, AVERAGE, and IF. The formula's result determines the formatting applied to the cell. If the result is TRUE, the formatting is applied; if FALSE, no formatting is applied.

Google Sheets - Conditional Formatting Based on Another Cell
Google Sheets - Conditional Formatting Based on Another Cell

For example, to apply red text to cells containing negative numbers, you could use the formula '=A1<0'. This formula checks if the value in cell A1 is less than zero. If true, the text color will be red; if false, the text remains the default color.

Using Cell References

a cell phone with the text'additional format rules'highlighted
a cell phone with the text'additional format rules'highlighted

Custom formulas can reference other cells using their addresses. For instance, to apply formatting to cells based on the value in another cell, you can use the formula '=B1=A1'. This formula checks if the value in cell A1 is equal to the value in cell B1. If true, the formatting is applied to cell A1.

You can also use relative references to create more dynamic formulas. For example, '=A1

Nesting Functions and Operators

The Ultimate Google Sheets Formulas Cheat Sheet
The Ultimate Google Sheets Formulas Cheat Sheet

Custom formulas can include functions and operators to create complex rules. For instance, to apply formatting to cells containing values greater than the average of a range, you could use the formula '=A1>AVERAGE(B1:D10)'. This formula checks if the value in cell A1 is greater than the average of the values in the range B1:D10.

You can also nest logical operators to create more complex rules. For example, '=AND(A1>50, A1<100)' checks if the value in cell A1 is greater than 50 and less than 100. If both conditions are true, the formatting is applied.

Managing Custom Formula Rules

Advanced Conditional Formatting in Google Sheets
Advanced Conditional Formatting in Google Sheets

Google Sheets allows you to manage and edit your custom formula rules easily. To view or edit a rule, click on the formatted cell, then click on the small paint can icon that appears in the top-right corner. This opens the 'Conditional formatting' panel, where you can see a list of all the rules applied to that cell.

To edit a rule, click on the three vertical dots next to it and select 'Edit rule'. This opens the 'Edit rule' dialog box, where you can modify the formula and formatting. To delete a rule, click on the three vertical dots and select 'Delete rule'.

The Ultimate Google Sheets Keyboard Shortcut Cheat Sheet for Beginners & Pros
The Ultimate Google Sheets Keyboard Shortcut Cheat Sheet for Beginners & Pros
Conditional Formatting with Google Sheets | ExcelMaster1
Conditional Formatting with Google Sheets | ExcelMaster1
Using Formulas and Conditional Formatting in Google Sheets
Using Formulas and Conditional Formatting in Google Sheets
23 Best formulas for Google Sheets (+ Examples)
23 Best formulas for Google Sheets (+ Examples)
CHECK the Conditional Formatting - Teacher Tech with Alice Keeler
CHECK the Conditional Formatting - Teacher Tech with Alice Keeler
10 Essential Google Sheets Formulas Everyone Should Know
10 Essential Google Sheets Formulas Everyone Should Know
How to highlight or conditional formatting the max or min value in Google sheet?
How to highlight or conditional formatting the max or min value in Google sheet?
the google sheets are in green and white
the google sheets are in green and white
6 Crazy Google Sheets Formulas You Should Know
6 Crazy Google Sheets Formulas You Should Know
Google Sheets: Construct Formulas with the INDIRECT Function - Teacher Tech with Alice Keeler
Google Sheets: Construct Formulas with the INDIRECT Function - Teacher Tech with Alice Keeler
How to Use Conditional Formatting in Google Sheets
How to Use Conditional Formatting in Google Sheets
an info sheet describing the different types of formal formats and how to use them
an info sheet describing the different types of formal formats and how to use them
a screenshot of the format dialog box with an arrow pointing to the text area
a screenshot of the format dialog box with an arrow pointing to the text area
Your Guide to Google Sheets Formatting
Your Guide to Google Sheets Formatting
Advanced formulas I used in real life in Google Sheets: Embed formulas into the header ! There are
Advanced formulas I used in real life in Google Sheets: Embed formulas into the header ! There are
Complete Excel Formula Cheat Sheet | Excel Functions, Shortcuts & Tips for Students
Complete Excel Formula Cheat Sheet | Excel Functions, Shortcuts & Tips for Students
Google Sheets: Creating Complex Formulas
Google Sheets: Creating Complex Formulas
Conditional Formatting Explained in Excel
Conditional Formatting Explained in Excel
How to Use Conditional Formatting in Excel
How to Use Conditional Formatting in Excel
Comprehensive Tutorial for Excel Conditional Formatting
Comprehensive Tutorial for Excel Conditional Formatting

Creating Rule Chains

You can create rule chains to apply multiple rules to a cell. Rule chains are processed in the order they appear in the 'Conditional formatting' panel. To create a rule chain, apply multiple rules to the same cell. The first rule that returns TRUE will apply its formatting to the cell. If no rules return TRUE, no formatting is applied.

For example, you could create a rule chain to apply different formatting to cells based on their value range. The first rule could apply formatting to cells containing values greater than 100, the second rule to cells containing values between 50 and 100, and the third rule to cells containing values less than 50. The cell's formatting would be determined by the first rule that applies.

Using Data Validation with Custom Formulas

Custom formulas can also be used in conjunction with Data Validation to create dropdown lists and other interactive features. To create a dropdown list, select the cells you want to include in the list, then click on 'Data' in the menu and select 'Data validation'. In the 'Criteria' section, choose 'List of items', then enter your list of items separated by commas. Finally, in the 'Input message' section, enter a custom formula to display a message when the user selects an invalid item.

For example, you could create a dropdown list of months and use a custom formula to display an error message if the user selects an invalid month. The formula '=COUNTIF($A$1:$A$12, A1)>0' checks if the selected month is in the list of valid months (A1:A12). If the formula returns FALSE, the user sees the error message.

Custom formula rules in Google Sheets offer a powerful way to apply formatting based on complex criteria. By understanding how to create and manage these rules, you can unlock new levels of functionality and efficiency in your spreadsheets. So, start exploring the possibilities and make your Google Sheets work for you!