try
Sub selectnrows()
'n = 3
'or
n = InputBox("how many")
Rows.Hidden = False
For i = 1 To Cells(Rows.Count, "a").End(xlUp).Row Step n
Cells(i, "a").Resize(n - 1, 1).EntireRow.Hidden = True
'MsgBox i
Next i
End Sub
Use a helper cell, number from 1 to N down the rows, select the 1 to N
cells, and copy, then Paste in starting at the first blank cell after N,
now sort on that column and then pick a group randomly, any number 1
through N.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.