How to generate random number between 1 to 4

Hi There,

Is there any way to generate a random number between 1 to 4 in the calculation?
I have to generate 3 random numbers between 1 to 4 for three different sections.

Regards
Vipul

Hello @vipulsinghal,

Please check the earlier posts in this forum. This has definitely been solved before. If the solution(s) are not satisfactory, please provide the details.

Best, Sergiy

Hi @sergiy,
Thanks for your reply.
I checked the earlier post on randomization. I was able to generate one random number by using “(int)Math.Round((4-1)*Quest.IRnd() + 1)” syntax which i took from the forum.
I have a follow-up question on this.
Is there any way to generate another random number in the same form?
When I am using this syntax to generate another random number in another section of the form, It’s giving me the same number. I tested this many times and the results are the same.

Any solution to this will be really helpful.

Regards
Vipul