20/05/20 11:11:47 nPhD6zxk.net
>>163
Dim r As Range
Dim n As Long
Dim i As Long
With Range("A1").CurrentRegion
With .Offset(1, 0).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible)
n = 0
For Each r In .Rows
n = n + 1
Next
if n = 0 then
exit sub
end if
n = 1以上n以下の乱数
i = 1
For Each r In .Rows
If i = n Then
rを使ってなにかする
Exit Sub
End If
i = i + 1
Next
End With
End With