Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

rand(a,b) except c

More
8 years 8 months ago #122515 by yasm
rand(a,b) except c was created by yasm
Hi all,

There is a way to set at randomization, that I no longer get all the numbers from 1-5 in the random function? (1-5 e.g.)
Code:
{if(randnr>=1, randnr, (rand(1,5)))}

I tried
Code:
{if(randnr>=1, randnr, (rand(1,8))/2)}
.. but it doesn’t work because it will be divided by 2.

Thanks!
Yasmina
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose