How to use conditional formatting in Google Sheets

When you’re parsing by way of massive quantities of information in a Google Sheets spreadsheet, conditional formatting will help you discover these bits of knowledge that you really want. Conditional formatting helps to visualise knowledge, by coloring in a cell and/or textual content, in addition to to know and be capable of interpret the info out there.

Whether or not it’s by discovering these items of information in a variety or by system, conditional formatting could be an environment friendly option to arrange knowledge. We’re going to point out you precisely tips on how to use this worthwhile software, so maintain studying.

Related: How to create an in-cell dropdown listing on Google Sheets

What is conditional formatting?

When it involves spreadsheets, conditional formatting refers back to the look of sure cells (e.g., bolding, highlighting, and so on.) being dictated by a set of predetermined circumstances. In different phrases, as soon as conditional formatting is established, the cells in a spreadsheet are mechanically formatted to look in sure methods relying on the info contained inside.

How to create conditional formatting in Google Sheets

The best option to set conditional formatting on Google Sheets is through the use of the Format possibility within the Google Sheets toolbar.

In this instance, we’ll study climate forecasts and knowledge over a 30-day interval, taking a look at what number of days have been predicted to be sunny, what number of have been predicted to be cloudy, what number of instances an umbrella was used when it truly rained, and a mixture of these variables.

The spreadsheet model of the next tutorial could be downloaded right here. Make a replica of the worksheet by choosing “Make a copy” from the drop-down within the File menu.

Conditional formatting in vary

Rows, columns, and a variety of cells could be formatted to background colour or modified in textual content based mostly on sure circumstances. Type within the URL along with your Google account, and a spreadsheet on Google Sheets might be created. You may have a variety of information, be it numbers or textual content, or a mixture of each, and also you need to spotlight that vary. In the menu bar, click on on Format, which then drops right down to an inventory. Click on Conditional formatting, which then results in a toolbar titled “Conditional format rules” that opens to the suitable of the display screen. A spread of choices can be found.

In the instance beneath for the worksheet titled “conditional formatting in range”, a variety of days lists whether or not the day by quantity is both “sunny” or “cloudy.” Click on a variety from cell B2 to B31. Go to Conditional formatting beneath Format within the menu bar. The conditional format guidelines toolbar then seems on the proper of the display screen. “Apply to range” will present B2:B31 within the choice. Under “Format rules,” for “Format cells if…” choose “Text contains” and a brand new window for “Value or formula” seems. In that window, sort Sunny, and beneath that in “Formatting style” choose the tipped paint container icon to pick out the colour, which on this case might be blue. To additional customise the chosen cells, click on on the letter A icon to select the colour yellow, which can spotlight the textual content in yellow. Click “Done” and the chosen vary of cells for “Sunny” might be highlighted.

For “Cloudy” days, repeat the identical process for “Sunny” however choose grey for the cell colour.

Formatting the cells isn’t restricted to textual content. Google Sheets presents a variety of choices that embrace dates and numbers, which comply with a “greater than” or “less than” sort of parameters.

Conditional formatting with system

The easy model of conditional formatting with system is the true-false assertion. This is greatest represented in an IF perform, which returns one worth if a logical expression is “true” and one other whether it is “false.”


=IF(logical_expression, value_if_true, value_if_false)

In the instance beneath for the worksheet titled “conditional formatting with formula,” “Sunny” and “Cloudy” are listed as forms of climate beneath the heading “Today’s Weather” in Column A. In Column B, the response to both could be “Yes” or “No.” To create the response in Column B, a system utilizing the IF perform might be created. Using Column A as reference, the system — following the syntax above — could be: “=If(B2=”Sunny”, “No”,”Yes”).” If the sphere within the reference cell is “Sunny,” the response would return “No” as a real response. If the cell have been “Cloudy,” the response could be false, or “Yes.” Conversely, the IF perform might be written with Cloudy, with a response of “Yes” if true and “No” if false.

There are web sites that present extra advanced formulation in conditional formatting. Some formulation outlined in Microsoft Excel, notably with AND/OR circumstances, for instance, could be utilized to Google Sheets.

Conditional formatting in vary with system

Combining conditional formatting by vary and with system can also be potential. In the instance beneath, the “range and formula” worksheet follows the format for the “conditional formatting in range” worksheet however provides a row for “Bring Umbrella?” For day by day listed, the IF perform follows the identical as within the “conditional formatting with formula” worksheet however with the addition of colour formatting for the “Yes” or “No” response.

For further formatting, you may depend what number of days have been sunny and cloudy over that 30-day interval through the use of the COUNTIF system.

Conditional formatting with two or extra variables

Conditional formatting can be utilized on two or extra variables by formatting a cell utilizing a custom-made system.

Using the instance on climate, and setting the result of a day on whether or not there was rain or no precipitation, we are able to set conditional formatting to find out whether or not the forecast for the day was both sunny or cloudy however ended up with rain or no precipitation.

Conditional formatting by colour will help visualize these days when it rained on sunny or cloudy forecasts. This will help to find out when it helped to carry an umbrella based mostly on the result of days when the climate known as for sunshine however truly ended with rain.

As an extension of COUNTIF, the COUNTIFS perform units standards for a variety of information based mostly on matching two or extra objects, or variables, within the dataset.


=COUNTIF(vary of search, merchandise in search)

=COUNTIFS(vary of search, merchandise in search, vary of search, merchandise in search)

In this case, decide a cell for the responses. Type =COUNTIF, and in parentheses, spotlight the vary, adopted by a comma and in double citation marks sort in “Sunny.” Do the identical for “Cloudy” search.

To learn the way many days the forecast was sunny, however ended up with rain and no umbrella, you need to use a mixture of these variables in conditional formatting to spotlight the textual content and COUNTIFS to assist decide the variety of days.

Still, there are limitations on utilizing conditional formatting to use to completely different standards so COUNTIFS helps to discern the visible knowledge.

There are many relevant formulation in conditional formatting, so discover out which one fits your wants in visualizing and understanding knowledge.

Again, the spreadsheet model of this tutorial could be downloaded right here. Make a replica of the worksheet by choosing “Make a copy” from the drop-down within the File menu.

This is only one of many articles about straightforward to make use of instruments in Google Sheets. Let us know what you’d prefer to see subsequent. Email us right here: [email protected]

Related: Doug Kass, who accurately predicted yields would drop, reveals prime shares for 2024