gpt4 book ai didi

excel - Excel 中按轮廓级别(组)着色

转载 作者:行者123 更新时间:2023-12-03 02:10:54 25 4
gpt4 key购买 nike

我想根据 Excel 中的大纲级别更改单元格的颜色,大纲级别是指列分组的级别。

我正在尝试使用 ActiveCell.OutlineLevel 属性在 ColorByValue 过滤器中使用。

这可能吗?或者,有没有办法通过 VBA 或函数来做到这一点?

colorbyvalue

最佳答案

感谢 JMax,我根据您的建议找到了解决方案!...

1-将条件格式规则添加到需要格式化的单元格中。

=OutlineLevel(CELL("col",CV1)) = 1

edit formatting rule

2- 该公式引用了一个输出行分组级别的小函数。

Function OutlineLev(inp As Integer) As Integer
OutlineLev = Columns(inp).OutlineLevel
End Function

有人能找到更优雅的解决方案吗?

关于excel - Excel 中按轮廓级别(组)着色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12400991/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com