Forum Discussion
moanawatt
Oct 14, 2022Copper Contributor
I want to random number formula for Game 24
Game 24 is a kind of math game. Players are given 4 numbers which range from 1 to 9 (it can't be 0, but can be 10,20, etc.) and must use addition, subtraction, multiplication or division to get a value of 24 i.e 1.3. 5.7 can be done as follows (7-3=4)(5+1=6)(6×4=24) or 5.5.5.5(5×5=25)(5÷5=1)(25-1=24)
So , I want to random number formula for Game 24 by cell separation such as A2 B2 C2 and D2 etc.
1 Reply
Sort By
- dscheikeyBronze Contributor
Hi! One possibility for your 4 random numbers is the following function:
=CHOOSE({1,2,3,4},RANDBETWEEN(1,10),RANDBETWEEN(1,10),RANDBETWEEN(1,10),RANDBETWEEN(1,10))
Instead of writing RANDBETWEEN() 4 times, you can also use the following function:
=MAKEARRAY(1,4,LAMBDA(a,b,RANDBETWEEN(1,10)))
Brand new - and therefore possibly not yet available for you:
=RANDARRAY(1,4,1,10,TRUE)
I hope I was able to help.