Hello,
I am trying to select certain rows from a very large data sheet. Ideally I would like to select every 25th row so as to get a random sample of data.
I've tried filters, row functions & formulas but nothing seems to work.
I'd appreciate any suggestions.
Many thanks,
KO
Configuration: Excel 2003 Windows XP Internet Explorer 7.0
Hello,
Sub Kateo()
Dim MyRange As Range, i As Integer
Set MyRange = Rows(2)
For i = MyRange.Row To Cells(Rows.Count, "A").End(xlUp).Row Step 25
Set MyRange = Union(MyRange, Rows(i))
Next i
MyRange.Select
End Sub
Ivan
|