The Student Room Group

Excel Help

I am just curious if:

=IF(RANDBETWEEN(1,10)>=9,"Credit Card","Cash")

Would mean that 20% of the time people pay by credit card.
Original post by Math-Illiterate
I am just curious if:

=IF(RANDBETWEEN(1,10)>=9,"Credit Card","Cash")

Would mean that 20% of the time people pay by credit card.


As the function will return one of the integers 1,2,3,4,5,6,7,8,9,10 at random then there is a 20% chance it will be 9 or 10 and an 80% chance it will not.
That is >= 9
In that case your IF statement will print "Credit Card" 20% of the time.

So yes. :smile:

Quick Reply

Latest

Trending

Trending