View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta Tushar Mehta is offline
external usenet poster
 
Posts: 1,071
Default 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