[英]Formatting a cell in a row based on matching a different cell value with a column header
I'm bonking my head against how to get Google Sheets to highlight one cell in each row of a grid. 我非常反对如何使Google表格突出显示网格的每一行中的一个单元格。 Column C is the Finish Date column where users enter a project completion date.
C列是“完成日期”列,用户可以在其中输入项目完成日期。 Row 4 is a row of dates (formatted to only show day number), off into the future.
第4行是一排日期(格式化为仅显示日期),直到将来。
It's similar to a Gantt chart, with text codes in columns to track components of tasks. 它类似于甘特图,在列中使用文本代码来跟踪任务的组成部分。 I would love to highlight a single cell in each row where the date in column C matches the date in row 4.
我想在每行中突出显示一个单元格,其中C列中的日期与第4行中的日期匹配。
Even fancier would be to extend this to highlight 2 cells in each row based on 2 date columns (C and D). 甚至更奇特的是可以基于2个日期列(C和D)将其扩展为突出显示每行2个单元格。 Here's an image of what I'm aiming for:
这是我要达到的目标的图像:
I've tried a number of scripting approaches with no success, and it all just looked so ugly I figured I'd kick this out to the world at large. 我尝试了多种脚本编写方法,但均未取得成功,但它们看起来都非常丑陋,以至于我想将其推广到整个世界。
Here's a demo sheet, hopefully: 希望这是一个演示表:
https://drive.google.com/open?id=1HgS2qEoEHYt_mwp5M7Mm2dXqgEb_DEGvfvM7Qeblgls https://drive.google.com/open?id=1HgS2qEoEHYt_mwp5M7Mm2dXqgEb_DEGvfvM7Qeblgls
=IF(E$4=$C5,1)
=IF(E$4=$C5,1)
=IF(E$4=$D5,1)
=IF(E$4=$D5,1)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.