Hi, I'm trying to simulate a game in which one randomly pulls marbles from a jar.
In my first round, the jar contains 4 black marbles and 6 white marbles.
To simulate the game's outcome I used this function:
=IF(RANDBETWEEN(0,9)<4,"Black","White")
Now, in the second round I have a jar containing 1 yellow marble, 5 red marbles and 7 green ones. How can I format "=IF" for me to have Excel display "Yellow" 1/13 times, "Red" 5/13 and "Green" 6/13 like:
=IF(RANDBETWEEN(0,12)=0,"Yellow",0<RANDBETWEEN(0,12)<6,"Red",RANDBETWEEN(0,12)<5,"Green"
This function doesn't work.
Thanks,
Ilerie
In my first round, the jar contains 4 black marbles and 6 white marbles.
To simulate the game's outcome I used this function:
=IF(RANDBETWEEN(0,9)<4,"Black","White")
Now, in the second round I have a jar containing 1 yellow marble, 5 red marbles and 7 green ones. How can I format "=IF" for me to have Excel display "Yellow" 1/13 times, "Red" 5/13 and "Green" 6/13 like:
=IF(RANDBETWEEN(0,12)=0,"Yellow",0<RANDBETWEEN(0,12)<6,"Red",RANDBETWEEN(0,12)<5,"Green"
This function doesn't work.
Thanks,
Ilerie