简体   繁体   English

使用条件格式突出显示单元格时,如何识别/处理 Excel 单元格颜色?

[英]How to identify/address Excel cell color when cells have been highlighted using conditional formatting?

I have an Excel sheet in which many cells have been highlighted using built-in conditional formatting commands.我有一个 Excel 工作表,其中使用内置条件格式命令突出显示了许多单元格。 If I try to change the cell color or fill by traditional means, I can neither change the non-filled cells to being filled, nor can I change the filled cells to being non-filled (the sheet is not locked, it's just that changing the color using these has no effect).如果我尝试通过传统方式更改单元格颜色或填充,我既不能将未填充的单元格更改为已填充,也不能将已填充的单元格更改为未填充(工作表未锁定,只是更改使用这些颜色没有效果)。 I can turn a filled cell "blank" by removing conditional formatting from the cell.我可以通过从单元格中删除条件格式来将填充的单元格变为“空白”。 Basically, I am trying to scan through the entire sheet and check each cell for whether or not it is colored, but I don't know the cell property to address for this particular case of formatting.基本上,我正在尝试扫描整个工作表并检查每个单元格是否有颜色,但我不知道要解决这种特殊格式情况的单元格属性。 I would greatly appreciate any help!我将不胜感激任何帮助! Thanks.谢谢。

To check for conditional formatting color you may have to use要检查条件格式颜色,您可能必须使用

Cells(x,y).DisplayFormat.Interior.Color or .ColorIndex Cells(x,y).DisplayFormat.Interior.Color.ColorIndex

to retrieve the color fill attribute as DisplayFormat compensates for the conditional formatting.检索颜色填充属性,因为DisplayFormat补偿了条件格式。

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

相关问题 Excel-根据其他突出显示的单元格使用条件格式突出显示单元格 - Excel - Highlight a cell using conditional formatting based on other cells that are highlighted 条件格式-检查突出显示的单元格Excel 2013 - Conditional Formatting - Checking Highlighted Cells Excel 2013 使用Excel VBA条件格式时如何突出显示单元格? - How to highlight cells when using Excel VBA conditional formatting? Excel-如何在突出显示具有相等值的单元格时自动突出显示单元格 - Excel - How to automatically highlight cells when a cell with equivalent value is highlighted 选择已使用条件格式格式化的单元格 - Selecting cells that have been Formated with Conditional Formatting 在Excel中使用C#中的条件格式更改单元格颜色 - Cell color change In Excel Using Conditional formatting in C# Excel 2007条件格式 - 如何获取单元格颜色? - Excel 2007 conditional formatting - how to get cell color? 如何使用office-js获取由条件格式引起的Excel单元格填充颜色 - How to get an Excel cell fill color caused by conditional formatting using office-js 如何选择条件格式突出显示的单元格? - How can you select cells highlighted by conditional formatting? 如何使用条件格式删除Excel中指定单元格的边框? - How to remove border for specified cells in Excel using conditional formatting?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM