0
하이라이트되고 표시되는 (숨겨지지 않은) 모든 행 수를 계산하려고합니다. 내 수식이 작동하지만 숨겨진 행이 여전히 숨겨져 있습니다. 강조 표시되고 보이는 행만 어떻게 계산합니까?VBA : 범위에서 숨겨진 행을 무시하는 방법?
'This function will count how many cells in a given range for a given color and are visible
Function COUNTCELLCOLORSIF(CellRange As Range) As Long
Dim rngCell
Application.Volatile
For Each rngCell In CellRange
If rngCell.Interior.ColorIndex = "36" and rngCell.visible Then
COUNTCELLCOLORSIF = COUNTCELLCOLORSIF + 1
End If
Next rngCell
End Function
확인'rngCell.RowHeight'는 셀> 0 –
@simoco 내가, 내가 formla을 계산할입니다 "= COUNTCELLCOLORSIF (A1 : A10)" – thedeepfield
@TimWilliams, 트릭을 해 줘서 고마워! – thedeepfield