lundi 18 janvier 2016

Convert excel formula code to programming language

Hi I have this code and I want to translate it to any other programming language such as Python Java ruby As you can see this is a raffle game user presses f5 And generates a raffle number such as Aqua 2231 7533 and stores all entries and at the end makes a random selection

This part is generation part

=LOOKUP(RANDBETWEEN(1,3),{1,2,3},{"Aqua","Blue","Red"})&" "&TEXT(RANDBETWEEN(0,9999),"0000")&" "&TEXT(RANDBETWEEN(0,9999),"0000")

And this part is the random selection

=INDEX(A:A,RANDBETWEEN(1,COUNTA(A:A)))




Aucun commentaire:

Enregistrer un commentaire