View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Darren Hill[_3_] Darren Hill[_3_] is offline
external usenet poster
 
Posts: 68
Default What function will give me a random full number from 1 to 6

In the formulas below, it struck me as odd you used INT in the VBA one but
avoided it in the Excel one. Is there a programming reason for this, or is
it just a personal preference?

Thanks
Darren



On Sun, 8 May 2005 09:50:35 -0400, Tom Ogilvy wrote:

VBA
num = int(rnd()*6+1)

Excel
=trunc(rand()*6+1)