根据颜色清除细胞内容? [英] Clear cell contents based on color?
本文介绍了根据颜色清除细胞内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以根据颜色单独清除大量的单元格内容?我不认为简单的过滤将在这方面工作得很好,因为数据集很大,'宽'
Is it possible to clear a large number of cells contents based on color alone? I don't think that simply filtering is going to work well on this because the dataset is large and 'wide'
推荐答案
将清除A1:G8填充黄色(65535)范围内的任何单元格的内容。更改颜色的颜色和范围的范围。这是一个粗暴的,抱歉的。
This will clear the content of any cell within the range A1:G8 filled with yellow (65535). Change the color for your color and the range for your range. This is kind of crude, sorry.
Sub Macro1()
Range("A1:G8").Select
For Each Cell In Selection
If Cell.Interior.Color = Excel.XlRgbColor.rgbYellow Then
Cell.Clear
End If
Next
End Sub
这篇关于根据颜色清除细胞内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文