![]() |
|
|
|
#1
|
|||
|
|||
|
HI,
This is typical type for sorting 5 different numbers. You can change the code to be more than this number (exmaple 2000). Good luck for coding!! Code:
Sub Sorting()
Dim Used(10) As Boolean
Dim TheRandom As Integer
For i1 = 1 To 10
Used(i1) = False
Next i1
For i = 1 To 5
Do
TheRandom = Int(Rnd(i) * 10)
Loop Until Not Used(TheRandom)
Used(TheRandom) = True
ActiveCell.Offset(i, 0) = TheRandom
Next i
End Sub
Kind Regards Last edited by Bird_FAT; 05-17-2009 at 08:43 AM. Reason: added code brackets |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pasting numbers: | Darren | Word | 0 | 04-01-2009 11:22 AM |
Page numbers...starting on page 3
|
Motiv8td1 | Word | 2 | 02-21-2009 07:21 AM |
Creating Hyperlinks
|
alicein1derville | Excel | 5 | 02-08-2009 10:31 PM |
| Reversed Printing of Numbers in Numbered Documents | HCM1962 | Word | 0 | 09-22-2008 10:39 AM |
| Creating a Distrubution List from Excel | webphotogeek | Outlook | 0 | 01-10-2008 11:21 AM |