简体   繁体   English

基于将不同的单元格值与列标题进行匹配,从而对行中的单元格进行格式化

[英]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

  • for yellow: =IF(E$4=$C5,1) 黄色: =IF(E$4=$C5,1)
  • for red: =IF(E$4=$D5,1) 红色: =IF(E$4=$D5,1)

0

demo spreadsheet 演示电子表格

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 根据行单元格和列标题有条件地格式化单元格 - Conditionally formatting cells based on a row cell and a column header 基于值格式化单元格 - Formatting Cell Based on Value 根据列单元格值清除特定行 - Clear specific row based on a column cell value 如何在当前单元格上方找到最接近的匹配值,并在同一行中返回不同的列? - How can I find the closest matching value ABOVE the current cell, and return a different column in that same row? 如果单元格值存在于不同的列中,则对范围内的单元格进行条件格式设置 - Conditional formatting cells in range if the cell value exist in a different column 即使行中的第一个相邻单元格为空白,也基于相邻单元格值的条件格式 - Conditional formatting based on adjacent cell value even when the first adjacent cell in row is blank 根据第1列的值将单元格范围附加到另一行的末尾 - Append cell range to end of different row based on column 1 values (谷歌表格或excel)如何在当前单元格上方找到最接近的匹配值,并在同一行中返回不同的列? - (google sheets or excel) How can I find the closest matching value above the current cell, and return a different column in that same row? 如何根据不同列中单元格的值显示一列中单元格的值? - How do I display the value of a cell in one column based on the value of a cell in a different column? 根据单元格值添加行,在 A 列的最后一个数据下方 - Add Row based on cell value, Below the last data in column A
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM