How to Apply Conditional Formatting to an Entire Row in Google Sheets

Video google sheet highlight row if cell contains

Have you ever wanted to format an entire row of data in Google Sheets based on certain conditions? Conditional formatting is an incredibly useful technique that allows you to format cells in your Google spreadsheet based on specific conditions. In this article, we will show you how to apply conditional formatting to an entire row of data in Google Sheets.

Step 1: Select the Range of Data to Format

The first step is to select the range of data that you want to apply conditional formatting to. In our example, we have selected:

Step 1 - Select the Range of Data

Step 2: Choose “Format > Conditional formatting…” from the top menu

Open the conditional formatting editing pane by choosing “Format > Conditional formatting…” from the top menu:

Step 2 - Conditional Formatting Menu

Step 3: Choose the “Custom formula is” rule

By default, Google Sheets will apply the rule “Cell is not empty”, but that’s not what we want here.

Click on “Cell is not empty” to open the dropdown menu:

Step 3 - Conditional Formatting Sidebar

Scroll to the bottom of the dropdown list and choose “Custom formula is”. This will add a new input field in the “If cells are” section of your editor:

Step 4 - Choose "Custom formula is"

Step 4: Enter Your Formula, Using the $ Sign to Lock Your Column Reference

In this example, let’s say we want to highlight all rows of data that contain “West” in column A. In this new input field, enter the following custom formula:

Step 5 - Enter the Custom Formula

The key point to understand is that you lock the column on which you want to base your conditional formatting by adding a $ sign before the column reference. Start by entering the first cell of your selected range:

It is very important that the row here matches the first row of your selected range (for example, if your data is in cells A10:C50, your conditional formatting rule will also start with A10).

Then, add the $ sign before column A only:

Finally, add the test condition, in this case, if the cell is equal to “West”:

Since the conditional formatting test is applied to each row, the value from the first cell in column A is used in the check.

To learn more about using the $ sign and understanding relative and absolute references, check out this article: How to Use Google Sheets: Beginner’s Guide.

Additional Examples of Conditional Formatting on an Entire Row

Based on a Threshold Value

This is an extremely useful application of this technique, which allows you to dynamically highlight data rows in your tables when the value exceeds a certain threshold.

In this example, I have highlighted all students who scored less than 60 in class, using this formula in the custom formula field:

Conditional Formatting Based on a Threshold Value

Based on Checkbox Selection

Google Sheets checkboxes are incredibly useful. If you haven’t used them yet, you’re missing out.

When a checkbox is selected, it has the value TRUE, and when it is not selected, the cell has the value FALSE. We can utilize this property in our custom formula:

Conditional Formatting with a Checkbox in Google Sheets

Examples of Multi-Condition Formatting

Example AND: Highlight an Entire Row When Both Conditions Are True

Often, we want to highlight based on two conditions. In this example, we will see how to highlight an entire row when both conditions are true.

Here, we want to highlight all rows with “Apartment” in column B and “Buyer” in column D.

We use an AND function for this.

Select the range of data and add this conditional formatting formula:

Conditional Formatting AND in Google Sheets

Example OR: Highlight an Entire Row When Condition A or Condition B Is True

This is similar to the previous example, but now we want to highlight the rows where either one or both conditions are true.

We use an OR function for this.

Conditions in the same column:

First, let’s see an example where both conditions can exist in the same column.

We want to highlight all rows with “House” in column B or “Townhouse” in column B. Notice the two conditions in column B.

Conditional Formatting OR in Google Sheets

We use the following conditional formatting formula:

Conditions in different columns:

This time, let’s imagine both conditions exist in different columns.

For example, assume we want to highlight all rows with “House” in column B or a sale price greater than $700,000 in column E.

Conditional Formatting OR Test in Google Sheets

Use this rule to achieve that:

Notice how the rule starts this time at row 2 and applies only to the data but not the header row. This is because the condition $E1 > 700000 evaluates to TRUE for the text header (weird!), which we want to avoid.

Example of Three Conditions

Suppose we want to check for a third condition…

We combine an AND function with an OR function and use parentheses to determine the order in which the tests are performed.

Consider this example:

Example of Three Conditions

The rule will highlight the row when either:

  • “House” is in column B, OR
  • Column E is a number AND it is greater than $700,000.

Both conditions in column E must be TRUE for the AND to evaluate to TRUE.

This rule is another way to solve the header problem in the previous example.

How to Apply Conditional Formatting to an Entire Column

We use the same idea as the examples above, but we lock the formula to a specific row instead of a column.

The formula to apply conditional formatting to entire columns is:

Conditional Formatting on an Entire Column

There you have it! Now you know how to apply conditional formatting to an entire row or an entire column in Google Sheets. Have fun with your spreadsheets and use this technique to make your data even more visually appealing and informative!

Crawlan.com

Related posts