6.6 C
London
Tuesday, March 11, 2025
HomeSoftware TutorialsGoogle SheetsGoogle Sheets: Conditional Formatting from Another Sheet

Google Sheets: Conditional Formatting from Another Sheet

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the custom formula function in Google Sheets to apply conditional formatting based on a cell value from another sheet.

The following example shows how to use the custom formula function in practice.

Example: Conditional Formatting Based on Another Sheet

Suppose we have the following dataset in Sheet1 that shows the total points scored by various basketball teams:

And suppose we have the following dataset in Sheet2 that shows the total points allowed by the same list of teams:

Suppose we’d like to highlight each of the cells in the Team column of Sheet1 if the value in the Points Scored column is greater than the value in the Points Allowed column in Sheet2.

To do so, we can highlight the cells in the range A2:A11, then click the Format tab, then click Conditional formatting:

In the Conditional format rules panel that appears on the right side of the screen, click the Format cells if dropdown, then choose Custom formula is, then type in the following formula:

=B2>INDIRECT("Sheet2!B2")

Google Sheets conditional formatting based on another sheet

Note: It’s important that you include the equal sign (=) at the beginning of the formula, otherwise the conditional formatting won’t work.

Once you click Done, each of the cells in the Team column where the value in the Points Scored column is greater than the value in the Points Allowed column in Sheet2 will be highlighted with a green background:

The only Team values that have a green background are the ones where the value in the Points Scored column in Sheet1 is greater than the Points Allowed column in Sheet2.

Note that if the sheet name you’re referencing has spaces in the name, be sure to include single quotes around the sheet name.

For example, if your sheet is called Sheet 2 then you should use the following syntax when defining the formatting rule:

=B2>INDIRECT("'Sheet 2'!B2")

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

Google Sheets: Conditional Formatting If Date is Before Today
Google Sheets: Conditional Formatting with Multiple Conditions
Google Sheets: Conditional Formatting if Another Cell Contains Text

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories