View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Arturo Arturo is offline
external usenet poster
 
Posts: 108
Default generating a whole random # from a list

Hello €“
I have a list of numbers in A1:A10, 1 through 10.
From that list of numbers, what Ive got below is partially working, but I
cannot seem to find how to generate a whole random # from that list€¦


Sub GenRand2()
Dim myRange As Range
Dim rO As Integer
Dim Result As Double

Set myRange = Worksheets("Sheet1") _
.Range("A1").CurrentRegion
rO = myRange.Rows.Count

Result = rO * Rnd()
MsgBox Result

End Sub


Sincerely,
Arturo