Thread
:
Trouble with RANDBETWEEN
View Single Post
#
10
Posted to microsoft.public.excel.programming
Tushar Mehta
external usenet poster
Posts: 1,071
Trouble with RANDBETWEEN
In article ,
says...
How would I go about calculating random numbers using a low and high number
boundary? I found the RANDBETWEEN function and this is apparently exactly
what I am looking for, but it does not seem to work in VBA. I am very new to
VBA and any suggestions would be welcome.
The general rule to generate random integers between a and b, both
inclusive and a < b, is a + Int(Rnd()*(b-a+1))
--
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
Reply With Quote
Tushar Mehta
View Public Profile
Find all posts by Tushar Mehta