简体   繁体   English

有没有办法根据另一个单元格对行和列进行条件格式设置?

[英]Is there a way to conditional format both row and column based on another cell?

I am trying to conditional format both row and column based on the data in C2.我正在尝试根据 C2 中的数据条件格式化行和列。

For example, if C2=1 then I want Row 1 and Column G to be highlighted because G contains "X".例如,如果 C2=1,那么我希望突出显示第 1 行和第 G 列,因为 G 包含“X”。 I know how to conditional format for the horizontal data (=$B5=$C$2), but is there a way to highlight the vertical data?我知道如何对水平数据进行条件格式 (=$B5=$C$2),但是有没有办法突出显示垂直数据?

数据

Try this尝试这个

在此处输入图片说明

Select cells C5 to U20 and then create a conditional format using this formula:选择单元格 C5 到 U20,然后使用以下公式创建条件格式:

=OR($B5=$C$2,INDEX($C$5:$U$20,$C$2,COLUMN()-2)="x")

在此处输入图片说明

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

相关问题 列中的条件格式单元格基于它在另一列中的对应值 - Conditional format cell in column based on it corresponding value in another column Excel条件格式-根据另一个单元格值将文本插入列 - Excel conditional format-Text into column based on another cell value (Excel) 有没有办法根据另一个单元格的值从一系列单元格中对单元格进行条件格式设置? - (Excel) Is there a way to conditional format a cell from a range of cells based on the value of an another cell? 在Excel 2007条件格式中,如何根据锁定列的单元格内容来格式化整个行? - In Excel 2007 conditional formatting, how to format an entire row based on the content of a cell of a locked column? Excel 条件格式 - 根据行号和公式格式化单元格 - Excel Conditional Formatting - format cell based on row number AND formula 根据单元格输入更改行中字体颜色的条件格式 - Conditional Format to change font color in row based on cell input 根据另一个单元格日期有条件地格式化空白单元格 - Conditional format a blank cell based on another cells date Excel条件格式基于单元格值的整个列 - Excel conditional format entire column based on cell value 条件格式整个列基于第一个单元格中的值? - Conditional format entire column based on value in first cell? 基于行或列标题值的条件单元计数 - Conditional cell counting based on row or column header values
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM