Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I need either a VB Macro or an Excel formula (Array formulas OK) that can
generate 5 unique random integers from 1 to x (as long as x5). I have seen answers that include links, but I cannot access most sites due to blocked access. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
This will put unique random numbers in a1 - A5 Sub Sonic() Dim FillRange As Range TopVal = Int(InputBox("Enter maximum value")) Set FillRange = Range("A1:A5") For Each c In FillRange Do c.Value = Int((TopVal * Rnd) + 1) Loop Until WorksheetFunction.CountIf(FillRange, c.Value) < 2 Next End Sub Mike "RollieG" wrote: I need either a VB Macro or an Excel formula (Array formulas OK) that can generate 5 unique random integers from 1 to x (as long as x5). I have seen answers that include links, but I cannot access most sites due to blocked access. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Random number Generator | New Users to Excel | |||
random number generator | Excel Discussion (Misc queries) | |||
Random number generator | Excel Worksheet Functions | |||
random number generator | Excel Discussion (Misc queries) | |||
random number generator | Excel Discussion (Misc queries) |