May 6, 200322 yr Hello I have a range of numbers for streets. The fields are called lo and high. If the field called "oddeven" says "o" i would like to get a random number in the range that is an odd number , but if the field "oddeven" says "e" I would like to get an even number in the range . Is this possible? Thanks Dave
May 6, 200322 yr I don't understand if you need to generate the number if so than 2*Int(random*(lo-hi)/2 - 1)+(oddeven="o") will do the job Dj
May 6, 200322 yr Author Thanks for the answer. The only time it doesn't work is when the Hi and Lo number are the same in which case it just needs to be that number. For example, If Hi = 33 and lo = 33 then result should be 33. Not clear about that part, Also it puts a negative sign "-" before the number answer. thanks Dave
May 6, 200322 yr Sorry, didn't think before posting. Here's the formula Case(hi-lo ,Min(hi,lo)+2*Int(Random*(Abs(hi-lo)- 1)/2)+(oddeven="o"),hi) and make Hi and Lo of type number (or use textToNum function) Dj
Create an account or sign in to comment