大家好,
当前在SpecialCells(xlCellTypeVisible)上工作,在过滤数据之后,单元格将以绿色突出显示,如图1所示,但是当使用公式时,也会选择行号。
我需要获取可见单元格的结果将突出显示,没有添加额外的行,如图2所示。
下面是使用的公式。
OB2.ActiveSheet.UsedRange.Offset(1, 0).SpecialCells(xlCellTypeVisible).Rows.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent6
.TintAndShade = 0.399975585192419
.PatternTintAndShade = 0
End With
答案 0 :(得分:1)