fbpx

How to Use Conditional Formatting in Google Sheets

Here's a complete guide to conditional formatting in Google Sheets to help you automatically highlight and easily visualize your spreadsheet data.

Conditional formatting in Google Sheets is a powerful tool that allows you to highlight sections of your spreadsheet based on certain criteria set by you.

Using conditional formatting, you can change a cell’s background color or the style of the cell’s text, based on your desired pre-sets. This makes it easy to emphasize and visualize important data.

In this post, we will show you how simple it is to use conditional formatting in Google Sheets. We’ll walk through the process of highlighting cells with certain conditions and discuss when each type of condition should be used.

Conditional formatting in Google Spreadsheets

  • Create/open the Google Sheet by going to http://sheets.google.com
  • Select the cells or the range you want to apply format rules to.
image 1bc4370ae22961a1479d4709f83e36af 800
  • Click Format → Conditional formatting
image bcee186206f9fc9d21d7a3a24b6d045a 800
  • On the toolbar on your right, go to the drop-down and select a rule.
  • You can select a rule-based on your requirement or you can click on Custom formula is and type in a formula manually
image 32c2f595f7bafa9cc42d548ad296e28f 800
  • Next, under Formatting style, select a text style, color or background color to be used when the conditions are met.
image e5fd79777d1ab7d14eb45a24c0c6064e 800
  • Click Done.

For example, I would like to highlight all the cells in this data range with values over $1000.

  • Under formatting rules, I will select Greater than from the drop-down, and type in 1000 in the field below it.
image 0ba2979aa4a9425b7e7bae37635126c6 800
  • I picked a purple color from the grid, so all the values greater than $1000 can be highlighted in purple.
image 42334c6cd9eba68081c8778fcaab34b4 800

How to copy conditional formatting in Google Sheets

In order to copy conditional formatting from one data range to another in the same Google Sheet, follow the following steps:

  • Select the data range that has the conditional formatting rules applied to it.
image ad0cb20814393598e4efd3e2663a62b4 800
  • Right-click and then click on Copy (or use the keyboard shortcut Control + C)
image 407e7fd76084f6f317e0002eeaa713d5 800
  • Select the data range of cells where you want to paste the copied conditional formatting
  • Right-click on any of the selected cells
  • Click on Paste Special, then click on ‘Paste format only’ option (or use the keyboard shortcut CONTROL + ALT + V)
image e395c3f22e83657ce7662e1811d1a749 800
  • As specified by the condition set in the first data range, all values greater than or equal to $25000 have been highlighted in the second data range as well.
image 8edc09a5c2f8ba421022c1c7bb44e08c 800

Conditional formatting based on another cell in Google Sheets

In the previous section, we learned how to highlight/format cells, based on the conditions set within the selected range. However, it is also possible to set conditional formatting in the selected range, based on the criteria of another range in the sheet.

  • Open your Google Sheet and select the data range.
  • Click Format → Conditional formatting
image 303c6035fd60fa6f15cf62544eedd698 800
  • On the toolbar on your right, go to the drop-down and select Custom Formula is

As an example, I would like to highlight the sales made by Michelle

  • My data range is D2:D18
  • My custom formula will be =B2=”Michelle”
  • Pick a formatting style
  • Click Done
  • All the sales made by Michelle will be highlighted
image 8b5abd216328816199d017a6384a6655 800

As another example, I would like to see which sales rep made a sale over $2000

  • My data range is B2:B18
  • My custom formula will be =D2>2000
  • Pick a formatting style
  • Click Done
  • All the sales reps with a unit sale of over $2000 will be highlighted
image f344c72b404d05d8062067dbd7effe3f 800

In another example, the custom formula can be tied to a condition cell, whereby all values lesser than the conditional value need to be highlighted

  • Put a value in a cell as a condition i.e. $1000
  • My data range is D2:D18
  • My custom formula will be =D2<$F$2 (The $ signs ensure the cell is locked in the formula)
  • Pick a formatting style
  • Click Done
  • All the sales less than $1000 will be highlighted
image fb847cc9acd7bc957a994126bb3e8944 800

If I change the value in the condition cell, my highlighted values will change dynamically, without having to change the conditional formatting rules

image 6cbc412b83e41e360ea2d8f9fedc2fc1 800

Conditional formatting based on multiple conditions

Multiple conditions can be applied to the same data. However, it is important to note that the order of these conditions is important, as the conditions are applied in the order they are set.

For example, using my data range, I want to highlight all unit sales over $2000

  • My data range is D2:D18
  • My custom formula will be =D2>2000 OR pick Greater than from the Formula rules dropdown.
  • Pick a formatting style
  • Click Done
  • All unit sales over $2000 will be highlighted
image 834a3c569c8665a6a7e13980233ee517 800

To continue with this example, I want to use the same data range and highlight all unit sales over $1000 in a different color

  • Scroll down, click on Add another rule
image 98ab475ec4b3c81d224bb786613f118c 800
  • My data range is D2:D18
  • My custom formula will be =D2>1000 OR pick Greater than from the Formula rules dropdown.
  • Change formatting style from the previous condition
  • Click Done
  • All unit sales over $1000 will be highlighted
image dd39fdff6fe5ac3562313528f458570a 800

Using the Custom formula, multiple conditions can be applied to data ranges, however, the order of conditions is of utmost importance.

Click your data range, then click on Format → Conditional Formatting to see all the formatting rules applied to it on the sidebar.

Using the three vertical dots next to the rule, you can drag and drop the order of rules to change the sequence.

image 547b432a805c9329551a481a6e2f47c8 800

Relevant Formulas

Logical Function IF

Conditional formatting on Google Sheets is based on the embedded IF function:

Logical Function IF

You can use this formula to devise several custom formulae. If true, the value will be highlighted. If false, as below, it will do nothing:

= IF(logical_expression, value_if_true, value_if_false)

Logical Function AND

As an expansion of the IF function, this function highlights values that hold true for multiple logical expressions:

= AND(logical_expression1, [logical_expression2, ...])

Logical Function OR

Again, as an expansion of the IF function, at least one argument must be TRUE for the cell to be highlighted in conditional formatting

OR(logical_expression1, [logical_expression2, ...])

As proficiency develops with using logical functions to implement in your custom formatting, you may find it helpful to combine these functions to create more analytical and impactful datasheets.

References

Tiller Money

Tiller Money

Your financial life in a spreadsheet, automatically updated each day.

Start Your Free Trial

"There isn’t another tool on the market that does what Tiller can do.”
Will Hinton, Google Review October 30, 2023