Unique (text) value for Randbetween

  • Here is my request:


    I have one question A1 with four possible answers. (A2,A3,A4,A5)

    Code
    =INDEX($A$2:$A$5; RANDBETWEEN(1;4))


    But this one will give me double results, for ex. A2,A3,A3,A2. I try with RAND function but no success.

    Code
    =INDEX($A$2:$A$5;RAND()*4+1; RANDBETWEEN(1;4))


    Anybody have any idea how to solve this problem?


    Thx

  • Try


    =CHOOSE(RANDBETWEEN(1,4),A2,A3,A4,A5)

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • @KjBox Not working I still have duplicate.


    =CHOOSE(RANDBETWEEN(1;4); $A$2; $A$3; $A$4; $A$5)
    [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 91"]

    [tr]


    [TD="width: 121"]question1[/TD]

    [/tr]


    [tr]


    [td]

    answer 1

    [/td]


    [/tr]


    [tr]


    [td]

    answer 1

    [/td]


    [/tr]


    [tr]


    [td]

    answer 3

    [/td]


    [/tr]


    [tr]


    [td]

    answer 4

    [/td]


    [/tr]


    [/TABLE]

  • Hi,


    I found out one solution over pair Rand() cell for each text cell.
    For detail please check this web

    HTML
    https://www.ablebits.com/office-addins-blog/2018/01/31/excel-random-selection-random-sample/


    If anybody know any better (shorter) solution then this one, please advice.

  • Attach a sample workbook and show exactly how you want to apply the random answers.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!