[英]SpecialCells(xlCellTypeVisible) extra row is selected in excel vba
大家好,
目前正在處理 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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.