View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Random number from range

This works by randomely choosing the row nimber to get the mimber from and
then writing whatever was found in that cell to E14

Mike

Sub getnumber()
x = Int((52 - 32 + 1) * Rnd + 32)
mynumber = Worksheets("sheet1").Cells(x, 18).Value
Worksheets("sheet1").Cells(14, 4).Value = mynumber
End Sub

Mike

"Anthony" wrote:

Hi,
can somebody give some code or a formula to chose a number at random from a
list in range R32:R52, then place this randomly chosen number in cell E14 of
sheet3 and finally remove this number from the list in the original range.

thanks