Highlight a Row in Google Sheets Using Conditional Formatting - WindowsTips.net - Windows Tips and Tricks with Geek

Monday, September 6, 2021

Highlight a Row in Google Sheets Using Conditional Formatting

 Microsoft Excel logo

Highlight all the cells inside the table and then click on Format > Conditional Formatting from the toolbar.

Highlight the information in the table, click Format, and then click "Conditional Formatting."

From the panel that opens on the right, click the drop-down menu under “Format Cells If,” and choose “Custom Formula Is.”

Click the drop-down menu and choose "Custom formula is" from the list of rules.

In the “Value or Formula” text box that appears, type the formula to highlight the specific data you want to isolate in this table. For our table, we will use a formula that highlights an entire row if the release year is before 1980. It looks like this: =$D3<1980

Type in your formula that you want to use to search for data. Be sure to use the dollar sign before the column letter. This makes sure the formula only parses the column specified.

The first part of the formula (=$D3) tells Sheets that we want to start examining the data from cell D3. The dollar sign at the beginning is mandatory and says that the column (D) is fixed, but the row (3) is flexible. This allows the formula to check the data in the entire column.

The second part (<1980) of the formula is the condition the data has to meet to return True. For our example, we’re just looking for any movies released before 1980.

Note: If you want your result to be inclusive of the date entered, type <=1980 to return everything released in 1980 as well.

Next, select the type of formatting you want to apply when the conditions are met. You can apply bold, italic, underline, strikethrough, font color, or cell color to your results. By default, each row fills with a light-green color.

After you choose how you want the rows to appear when your formula finds a match, click “Done.” You can close the panel or create another rule to apply conditional formatting to as well.

After you customize the formatting style, click "Done."

And just like that, the rows of movies released before 1980 are highlighted in green.

The result shows that only movies that were released after 1980 have been colored in with a green background.

Although this is a simple example of a formula, there are no limits to how you can utilize this extremely helpful tool. You can even use advanced formulas and functions to match data in the table.

For example, if we wanted to find every director with the first name “George,” we can use the REGEXMATCH function and a short Regular Expression (regex) to do just that. It would look something like this: =REGEXMATCH($C3, "\AGeorge\s*([^\n\r]*)")

An example of an advanced formula that finds every director with the first name "George."


That’s it! With the use of conditional formatting in Google Sheets, you’ve searched for specific columns of data and then highlighted the entire row using a custom formula.

This is the perfect tool to help create intricate spreadsheets with beautifully formatted data that catches everyone’s attention.

No comments:

Post a Comment