View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Selecting random rows

Hi Anar,

Here is one way

Dim rng As Range
Do
If rng Is Nothing Then
Set rng = Rows(Fix(Rnd() * 500 + 1))
Else
Set rng = Union(rng, Rows(Fix(Rnd() * 500 + 1)))
End If
Loop Until rng.Areas.Count = 70

rng.Select


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"anar_baku" wrote
in message ...

Hi,

Is it possible to select, say 70 random rows from 500 rows? Sorry it's
a very short question, but I don't even know where to start!

Many thanks,

Anar


--
anar_baku
------------------------------------------------------------------------
anar_baku's Profile:

http://www.excelforum.com/member.php...o&userid=18259
View this thread: http://www.excelforum.com/showthread...hreadid=509941