Hey gurus, first one is from a tutorial:
I tried different method, are they essentially the same plus I can define the lower bound ? Thanks!
VBA Code:
Function aasd(maxzone, number)
Dim d As New Dictionary
Dim entry As Integer
Application.Volatile
Do
entry = Int(Rnd() * maxzone + 1)
d(entry) = ""
Loop Until d.Count = number
aasd = Application.Transpose(d.Keys)
End Function
I tried different method, are they essentially the same plus I can define the lower bound ? Thanks!
VBA Code:
Function asd(lower, upper, many)
Dim d As New Dictionary
Dim a
Application.Volatile
If many > 1 and upper>many and upper>lower Then
Do
a = Application.WorksheetFunction.RandBetween(lower, upper)
d(a) = ""
Loop Until d.Count = many
Else
End
End If
asd = Application.Transpose(d.Keys)
End Function