谷歌表格_如何使用条件格式突出显示Google表格中的行

谷歌表格_如何使用条件格式突出显示Google表格中的行

谷歌表格

谷歌表格_如何使用条件格式突出显示Google表格中的行

Should you need to isolate data in Google Sheets based on specific criteria in a cell, you can use conditional formatting to highlight entire rows in your spreadsheet. Here’s how to do it.

如果您需要根据单元格中的特定条件隔离Google表格中的数据,则可以使用条件格式突出显示电子表格中的所有行。 这是操作方法。

Fire up your browser, head to Google Sheets, and open up a spreadsheet with a table of data you want to apply conditional formatting to highlight specific rows.

启动浏览器,转到Google表格 ,然后打开一个包含要应用条件格式以突出显示特定行的数据表的电子表格。

RELATED: The Beginner's Guide to Google Sheets

相关: Google表格初学者指南

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

突出显示表格中的所有单元格,然后从工具栏中单击“格式”>“条件格式”。

谷歌表格_如何使用条件格式突出显示Google表格中的行

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

在右侧打开的面板中,单击“如果设置单元格格式”下的下拉菜单,然后选择“自定义公式为”。

谷歌表格_如何使用条件格式突出显示Google表格中的行

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

在出现的“值或公式”文本框中,键入公式以突出显示要在此表中隔离的特定数据。 对于我们的表,如果发布年份在1980年之前,我们将使用一个公式突出显示整行。看起来像这样: =$D3<1980

谷歌表格_如何使用条件格式突出显示Google表格中的行

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.

公式的第一部分(= $ D3)告诉Sheets我们要开始检查单元格D3中的数据。 开头的美元符号是强制性的,表示列(D)是固定的,但行(3)是灵活的。 这使公式可以检查整个列中的数据。

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.

公式的第二部分(<1980)是数据必须满足的条件才能返回True。 对于我们的示例,我们正在寻找1980年之前发行的所有电影。

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

注意:如果希望结果包含输入的日期,请键入<=1980以返回1980年发布的所有内容。

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.

选择要在公式找到匹配项时显示行的方式后,单击“完成”。 您可以关闭面板或创建另一个规则以应用条件格式。

谷歌表格_如何使用条件格式突出显示Google表格中的行

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

就像那样,1980年前发行的电影以绿色突出显示。

谷歌表格_如何使用条件格式突出显示Google表格中的行

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 to do just that. It would look something like this: =REGEXMATCH($C3, "\AGeorge\s*([^\n\r]*)")

例如,如果我们想找到每个名字叫“乔治”的导演,我们可以使用REGEXMATCH函数和一个简短的正则表达式来做到这一点。 看起来像这样: =REGEXMATCH($C3, "\AGeorge\s*([^\n\r]*)")

谷歌表格_如何使用条件格式突出显示Google表格中的行


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.

而已! 通过在Google表格中使用条件格式,您已经搜索了特定的数据列,然后使用自定义公式突出显示了整行。

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

这是一个完美的工具,可以帮助您创建格式精美的复杂电子表格,引起所有人的关注。

翻译自: https://www.howtogeek.com/439209/how-to-highlight-a-row-in-google-sheets-using-conditional-formatting/

谷歌表格