Random number from range
Assuming the list is in Sheet1:
Sub marine()
i = Round(Rnd() * 20, 0)
Set r = Sheets("sheet1").Range("R32").Offset(i, 0)
Sheets("Sheet3").Range("E14").Value = r.Value
r.Clear
End Sub
--
Gary''s Student
gsnu200709
"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
|