Random number during survey

What is the problem? Please be detailed.
Hi, Thanks.
I have in the past developed survey online through KoboToolbox. This time i am designing survey using xls form. In my household survey, i want the enumerator survey up to two households only in a premises. Thus in case the number of households in a premises is more than 2 I want the two households to survey to be the two numbers generated randomly. What could be the code for this?
What ODK tool and version are you using? And on what device and operating system version?
xls form uploading to KoboToolbox

What steps can we take to reproduce the problem?

What you have you tried to fix the problem?

While I tried with this to generate a random number from 2 to ${noofhhs} ..once(int(${noofhhs}*random())+2).. I sometimes get number ${noofhhs}+1 as well generated.

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.
Test random no generation.xls (22 KB)

Hi, my problem while generating one random number from 2 to ${noofhhs} seems to be solved with the following code - once(int((${noofhhs}-1)*random())+2); as in the following:

Now my problem is - "how to generate two random numbers"?.