简体   繁体   English

(Excel) 有没有办法根据另一个单元格的值从一系列单元格中对单元格进行条件格式设置?

[英](Excel) Is there a way to conditional format a cell from a range of cells based on the value of an another cell?

I have a cell with a text, which is the place of an another cell that I want to highlight.我有一个带有文本的单元格,这是我要突出显示的另一个单元格的位置。 Lets say that it is the F6 cell, and in it, it says 'C6'.假设它是 F6 单元格,在其中显示“C6”。 Is there a way to use conditional formatting to highlight the 'C6' cell ?有没有办法使用条件格式来突出显示“C6”单元格? Any other cell can be inputted into the F6 cell and the formatting will highlight it, if it is in the Data range.任何其他单元格都可以输入到 F6 单元格中,如果它在数据范围内,格式将突出显示它。

示例图片

You could compare the address of the current cell to the contents of F6, either:您可以将当前单元格的地址与 F6 的内容进行比较,或者:

=ADDRESS(ROW(),COLUMN(),4)=$F$6

or或者

=SUBSTITUTE(CELL("address",B4),"$","")=$F$6

在此处输入图片说明

If you are happy to write $C$6 you could use CELL()如果你愿意写 $C$6 你可以使用CELL()

Define conditional formating on B4:D7 as =CELL("address",B4)=$F$6 =CELL("address",B4) will return the reference of that cell in the from of $COLUMN$ROW (eg $C$6 for the cell C6 ) and that you can then compare.B4:D7上的条件格式定义为=CELL("address",B4)=$F$6 =CELL("address",B4)将返回 $COLUMN$ROW 中该单元格的引用(例如$C$6对于单元格C6 ),然后您可以进行比较。

暂无
暂无

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

相关问题 Excel条件格式-根据另一个单元格值将文本插入列 - Excel conditional format-Text into column based on another cell value 根据另一个单元格的值更新一系列单元格 - Updating a range of cells based on the value of another cell Macro Excel可根据单元格匹配将范围单元格从一张纸复制到另一张纸,如果不匹配,则跳过单元格 - Macro Excel to copy range cells from one sheet to another based on cell match and skip cell if no match 根据另一个单元格日期有条件地格式化空白单元格 - Conditional format a blank cell based on another cells date Excel 2007-VBA-根据单元格值在范围上应用条件格式 - Excel 2007 - VBA - Apply Conditional Format on Range Based on Cell Values 如果另一个单元格的值为“ x”,则将一系列单元格的格式设置为未锁定 - Format a range of cells as unlocked if another cell has a value of “x” 条件格式,使用公式根据不同的单元格值范围进行格式化 - Conditional Formatting, using an formula to format based on different cell value range 如何计算值小于excel中另一个单元格的范围内的单元格? - How to count cells in a range with a value less than another cell in excel? EXCEL:需要在另一个工作表的单元格范围内查找值,并从相邻单元格返回值 - EXCEL: Need to find a value in a range of cells from another worksheet and return value from adjacent cell Excel - 如果单元格范围等于列表中的值,我想填充另一个单元格的值 - Excel - if a range of cells equals a value from a list I want to populate the value of another cell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM