How does one use a string value as a random value, I have 3 values namely SMS, Datasynergy and Other, i want to simulate live data by using the random function to assign one of the aforementioned value to my field at random?
The way i thought of it is to make a random value between 1-3 and and then go on to say if 1 = SMS else if 2 = Datasynergy else Other
But im pretty sure there must be other ways of doing this?
Thanks in advance.
try this
=CHOOSE(RANDBETWEEN(1,3),"SMS","Datasynergy","Other")
Another way is to use INDEX, e.g.
=INDEX({"SMS","Datasynergy","Other"},RANDBETWEEN(1,3))
which you can easily adapt for a longer list like this
=INDEX(List,RANDBETWEEN(1,COUNTA(List)))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With