VBA读取单元格可见行数问题
发布网友
发布时间:2024-10-20 13:29
我来回答
共1个回答
热心网友
时间:2024-11-02 10:19
Sub test()
Dim rng As Range
With ActiveSheet
For Each rng In .Range("A:A").Cells
If rng <> "" And rng.EntireRow.Hidden = False Then n = n + 1
Next
.Range("B3") = n
End With
End Sub
对A列非空单元格及非隐藏行计数,写入同表B3单元格