My original formula returned Text values. Sandy's post has formulas returning real numbers which you must then custom format in order to retain leading zeros. We do not know whether you need to use these numbers in some kind of mathematical formula or if they are ID's or have some other purpose that do not require them to be used in further numerical calculations. If the latter, my original formula will work fine for you, but if you need real numbers that have to be custom formatted, then instead of converting my original formula the way Sandy did, I would simply use this formula instead and then custom format it...
=RANDBETWEEN(1,9999999999)