google-sheets - 根据谷歌电子表格中单列的值对整行进行颜色编码(条件格式)

标签 google-sheets formatting spreadsheet conditional-formatting

我在 Google 电子表格中有一些数据。 看起来像-

+----+--------------+---------+
|user|cos_similarity|item_rank|
+----+--------------+---------+
|  u1|   0.004437351|        1|
|  u1|  0.0043772724|        2|
|  u1|   0.004322561|        3|
|  u1|   0.004322561|        3|
|  u2|   0.004557799|        1|              
|  u2|   0.004471699|        1|               
|  u2|  0.0043906723|        1|              
|  u2|  0.0043018474|        2|         
|  u2|  0.0042955037|        3|         
+----+--------------+---------+

我想根据名为“item_rank”的列中存在的值对电子表格(所有行)进行颜色编码。

因此,整行从“item_rank”列中的值获取颜色。这些颜色应该反射(reflect)我通过特定列中的值定义的组。

预期输出-

Rows 1, 5, 6 should be having the same color because they have 'item_rank'=1.
Rows 2, 8 should be having the same color because they have 'item_rank'=2.
Rows 3, 4, 9 should be having the same color because they have 'item_rank'=3.

如何实现这一目标?

最佳答案

对范围 A2:C 使用此公式变体:

=$C2=1

enter image description here

关于google-sheets - 根据谷歌电子表格中单列的值对整行进行颜色编码(条件格式),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65422986/

相关文章:

javascript - RegexReplace 和 RangeToTable 问题

excel - VBA - 将图表从 Excel 粘贴到 PowerPoint 时保持源格式

c# - 使用 string.format 和 List<T>.Count() 进行动态字符串格式化

java - 如何使用 ODFDOM 设置 ods 电子表格的页面大小、页面方向和页边距?

jquery - SlickGrid JQuery 插件 - 将数据从一个电子表格复制到同一网页上的第二个电子表格

Excel - 空白单元格?

java - 未经授权收集Google表格信息

javascript - Google Sheets 脚本日期比较未返回预期结果

node.js - 使用 Google Sheets API v4 编辑文档的监听器

c++ - 在 C++ 中格式化日期