Google Spreadsheets:按相同单元格分组行,并为这些行设置背景颜色。

huangapple go评论64阅读模式
英文:

Google Spreadsheets: Group rows by equal cell and set background color for these rows

问题

Using Google Spreadsheets:我需要按相同单元格值分组行并设置这些行的背景颜色。

我需要交替两种颜色,每次匹配一种。

这里有一个可编辑的电子表格,有真实示例。关键值是列B中的单元格:title (KEY)

可编辑文件: 链接

截图: Google Spreadsheets:按相同单元格分组行,并为这些行设置背景颜色。

英文:

Using Google Spreadsheets: I need to Group rows by equal cell value and set background color for these rows.

I need to alternate two color, one for each match.

Here an editable spreadsheet with the real example. The key value is the cell on column B:title (KEY)

Editable file: https://docs.google.com/spreadsheets/d/1klXxhhdgaazGc-secQPZfwdNijLUK6OVOQUxdU-scQU/edit?usp=sharing

Capture:Google Spreadsheets:按相同单元格分组行,并为这些行设置背景颜色。

答案1

得分: 1

这是翻译好的部分:

Helper Column formula:

=scan(;B2:index(B:B;match(2;1/(A:A<>"";));lambda(a;c;if(c<>offset(c;-1;);a+1;a)))

Conditional formatting custom_formula:

Apply to range: A2:C

=isodd($D2)
=iseven($D2)*len($D2)

英文:

Added solution to your sheet here:

Helper Column formula:

=scan(;B2:index(B:B;match(2;1/(A:A&lt;&gt;&quot;&quot;)));lambda(a;c;if(c&lt;&gt;offset(c;-1;);a+1;a)))

Conditional formatting custom_formula:

Apply to range: A2:C

=isodd($D2)
=iseven($D2)*len($D2)

Google Spreadsheets:按相同单元格分组行,并为这些行设置背景颜色。

huangapple
  • 本文由 发表于 2023年4月19日 21:42:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76055258.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定