solin
Well-known member
- Messages
- 157
- Points
- 93
Built in Twister? I may use it myself
I guess you really haven't been around long enough to know I was going to add that to my own generator, but its randomization is always 'needed to be seeded' at such an insanely high number that i decided against it for a random generator that is going to be selecting a number between like 1-30 tops.
I didn't know they built it into excel but I'm guessing it was meant for fractional purposes where a small number would be seen as huge.
Your right about the human factor for sure, I actually had to rerun mine during my second raffle after walking away for ten minutes because I went straight from testing to doing the actual winners and I felt I may have unconsciously decided it was satisfactory when those numbers were on the screen...so I went and smoked a couple butts, came back and did one run.
Winners, period. Just to make sure I was fair.
To be honest idc if I ever win or lose, so no big deal to me if you draw paper out of a hat
But I don't need a lesson in the Rnd, rand, or rand_s for that matter, let alone the math.
I'm not sure about excel, but in C/C++ it would be done like this to generate a number between 1 and 10.
=INT(RAND()%(10)+1)
Or more properly
=INT(RAND()%(MaxUsers - LowestNum + 1) + LowestNum
Lowest number being 1 always. The percent instead of the multiplication makes it fractional which is the reason for the INT being there at all.
Again I don't use excel so i may be wrong.
In C/C++
it would be
int num = (int)((rand() % (maxUsers - LowNumber + 1)) + LowNumber)
You should never use 0 in a random function especially if its going to go fractional first as it can throw an error with an Integer if it goes below 0.5 or a negative number could be drawn.
Which is also why you add the +1 after subtracting the lowest number so its always a minimal of 1 before division...anyways.
If it works it works, if it throws an error in excel try changing the math, either way good luck with the draw and thanks for the chance![]()
Pfft... I'll leave all this -of yours- in an angry reaction + a lovely

AND the most ilogical randomness sake you might find in -your own- numerical methods as effective as meaningful to whatever your pursue
I quit and get distracted on purpose. Cheers