If div is a function or operator then you probably use Excel 2010 or 2011.
Unfortunately we do not have this update yet

If
e.g. 50 div 7, it will give the highest common factor of the number(integer),
so in this case it would be 7
then div = divide
this code will do the tricks

VB Code:
  1. dim randomvalue as integer
  2. randomvalue = mynumber /1000

since randomvalue is an INTEGER
e.g. 50/7 = 7.XXXXX

INTEGER do not take decimal so will equal 7