|
良く解っていませんけど...。
こう言うことなのかなぁ?
A列をオートフィルタした後の場合。
'可視セルの1つづつのアドレス
Sub aaaaa()
Dim rang As Range, cel As Range, adt() As Range
er = Range("A65536").End(xlUp).Row
MsgBox "可視セル最後の行、ERow=" & er
Set rang = Range("A2:A" & er).SpecialCells(xlCellTypeVisible)
MsgBox "可視セル行、CountA=" & Application.CountA(rang)
For Each cel In Range("A2:A" & er).SpecialCells(xlCellTypeVisible)
i = i + 1
ReDim Preserve adt(1 To i)
Set adt(i) = cel
tt = cel.Address
pp0 = 0
Next
MsgBox UBound(adt) & "行の可視セル(UBound)"
For i = 1 To UBound(adt)
MsgBox adt(i).Address
Next
Erase adt
End
End Sub
|
|